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

AP_BattMonitor: ESC: add mask parameter #27030

Merged
merged 1 commit into from May 13, 2024
Merged

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented May 9, 2024

This adds a ESC_MASK parameter to allow assigning particular ESCs to particular batteries. Default is 0 for use all which is the current behaviour.

libraries/AP_BattMonitor/AP_BattMonitor_ESC.cpp Outdated Show resolved Hide resolved
// @Param: ESC_MASK
// @DisplayName: ESC mask
// @Description: 0: Use all connected ESC's if none zero use those set in mask
// @Bitmask: 0: ESC 1, 1: ESC 2, 2: ESC 3, 3: ESC 4, 4: ESC 5, 5: ESC 6, 6: ESC 7, 7: ESC 8, 8: ESC 9, 9: ESC 10, 10: ESC 11, 11: ESC 12, 12: ESC 13, 13: ESC 14, 14: ESC 15, 15: ESC 16, 16: ESC 17, 17: ESC 18, 18: ESC 19, 19: ESC 20, 20: ESC 21, 21: ESC 22, 22: ESC 23, 23: ESC 24, 24: ESC 25, 25: ESC 26, 26: ESC 27, 27: ESC 28, 28: ESC 29, 29: ESC 30, 30: ESC 31, 31: ESC 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we go up to 32 bits on here and likely elsewhere but in reality we should only go up to 24 due to float-integer roundoff error.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the full 32 bits for all servo stuff.

@tridge tridge dismissed magicrub’s stale review May 13, 2024 23:57

its consistent with other uses

@tridge tridge merged commit 9026ce0 into ArduPilot:master May 13, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants