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

Add battery status MSP handling to BLHeli #24196

Merged
merged 1 commit into from Jul 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions libraries/AP_BLHeli/AP_BLHeli.cpp
Expand Up @@ -450,6 +450,18 @@ void AP_BLHeli::msp_process_command(void)
break;
}

case MSP_BATTERY_STATE: {
debug("MSP_BATTERY_STATE");
uint8_t buf[8];
buf[0] = 4; // cell count
putU16(&buf[1], 1500); // mAh
buf[3] = 16; // V
putU16(&buf[4], 1500); // mAh
putU16(&buf[6], 1); // A
msp_send_reply(msp.cmdMSP, buf, sizeof(buf));
break;
}

case MSP_MOTOR_CONFIG: {
debug("MSP_MOTOR_CONFIG");
uint8_t buf[10];
Expand Down