WIP: Refactor everything#3
Conversation
|
Hey there! Thanks for the PR. I've just started to go over it. I'm totally down to merge it once the radios work :) and we have equivalent functionality. Just for my understanding, as I'd brand myself as a C++ novice/hobbyist, I'd love to hear about why you changed what you did. Things definitely look a bit more succinct than before! I have to say that in writing a lot of the code I felt like there was a lot of duplication, but came to believe that was just a necessary evil of writing C++. I may sprinkle a few questions in, but would love to hear about your overarching design ideas, or any obvious problems you saw in the code before. Thanks! |
|
Hey @counterbeing ! Thanks for your comments. My intent was to get this a little farther along (to where it is now, more or less) and then add in some explanations, which hopefully I'll get to tomorrow. I'm also happy to get on a call and walk you (& Mac) through any or all of it. Radio work still to come. |
|
Thanks @anthonydavidson! This all sounds perfect. I'd love to hop on the phone with you and Mac at some point just to do a code review so that I can learn a bit more. I think in the coming weeks I'll be attempting to run a version of the software on new hardware (esp32) to see if I can adapt it. It's probably just easier hardware to run on. I'll try and run your new code if it's up! Are you running your changes on a nano currently? Cheers! |
…ationIndex goes back to zero)
|
Cory - Yes, I'm running on one of @100ideas 's scarves. I've got radio send working now, still need to update state on radio receive, but that should be it. |
If this is trouble feel free to revert it, i just think it might save us some pain later.
This is a work in progress. Radio receive is not functional.
Changes:
runAdjustments())MasterControllerthatloop()delegates to. It controls what mode the scarf is in - Off Mode or Animation Mode.MilliTimerclass to capture concept of checking on time passed.MyKnobwithButtonControl. It's a singleton like MyKnob was.MyKnobwithKnobSetting, though MyKnob was a singleton that had a bunch of references to it while KnobSetting captures (and contains) the information needed for a particular setting on an animation while still using a globalEncoder.