-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BCprop - Add blade array switching #734
base: master
Are you sure you want to change the base?
Conversation
Nope. Reverted. |
props/saber_BC_buttons.h
Outdated
size_t prev_real_best_config = NELEM(blades); | ||
|
||
#ifdef BLADE_ID_SCAN_MILLIS | ||
// Must be called from loop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must be called from loop" is the same comment as PollScanId() in prop base, but presumably this is not the same function, or you wouldn't have overridden it. Please update the comment to explain what this function does differently from the base function, otherwise the reader (me) will have to compare manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"must be called from loop" was from the initial copy . removed.
Comments added to hopefully explain the functions.
props/saber_BC_buttons.h
Outdated
// Manual blade array selection | ||
// even with Real TIme Blade ID active | ||
bool manual_blade_array_active = false; | ||
size_t last_real_best_config = NELEM(blades); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of these variables need a comment to explain what they do and why.
NELEM(blades) is probably not a valid value for these variables, I assum that is on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to SIZE_MAX
} | ||
|
||
// Manual Blade Array Selection version of FindBladeAgain() | ||
void FakeFindBladeAgain() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like it would be easier to just spoof the blade ID and then call the real FindBladeAgain()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty sure I tried simple.
Activation and deactivation of blades i think were the issue. Possibly something else but I needed to duplicate some.
Sorry, a little rusty on this one at first glance.
I'l re-read the thread when this was going on to refresh.
Should probably limit this to only if there's more than 1 blade config array?