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
e98cb3591b
commit
886f24764c
|
@ -450,6 +450,18 @@ void AP_BLHeli::msp_process_command(void)
|
||||||
break;
|
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: {
|
case MSP_MOTOR_CONFIG: {
|
||||||
debug("MSP_MOTOR_CONFIG");
|
debug("MSP_MOTOR_CONFIG");
|
||||||
uint8_t buf[10];
|
uint8_t buf[10];
|
||||||
|
|
Loading…
Reference in New Issue