Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

NoSloppy
Copy link
Contributor

@NoSloppy NoSloppy commented Jan 29, 2025

Should probably limit this to only if there's more than 1 blade config array?

  • guard the array switching code, done.

@NoSloppy
Copy link
Contributor Author

Should probably limit this to only if there's more than 1 blade config array?

  • guard the array switching code, done.

Nope. Reverted.

size_t prev_real_best_config = NELEM(blades);

#ifdef BLADE_ID_SCAN_MILLIS
// Must be called from loop()
Copy link
Owner

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.

Copy link
Contributor Author

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.

// 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);
Copy link
Owner

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?

Copy link
Contributor Author

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() {
Copy link
Owner

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()

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants