mirror of https://github.com/ArduPilot/ardupilot
AP_BLHeli: add battery status MSP handling
give internal error if an unknown MSP command occurs
This commit is contained in:
parent
2eca7224d3
commit
1f9539a1b3
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue