mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-27 11:08:29 -04:00
AP_BLHeli: fixed use of SERVO_BLH_AUTO
This commit is contained in:
parent
5bfc97f9c0
commit
6f704b3818
@ -409,7 +409,7 @@ void AP_BLHeli::msp_process_command(void)
|
||||
msp.escMode = (enum escProtocol)msp.buf[0];
|
||||
msp.portIndex = msp.buf[1];
|
||||
}
|
||||
debug("escMode=%u portIndex=%u", msp.escMode, msp.portIndex);
|
||||
debug("escMode=%u portIndex=%u num_motors=%u", msp.escMode, msp.portIndex, num_motors);
|
||||
uint8_t n = num_motors;
|
||||
switch (msp.escMode) {
|
||||
case PROTOCOL_4WAY:
|
||||
@ -1128,9 +1128,11 @@ void AP_BLHeli::update(void)
|
||||
/*
|
||||
plane and copter can use AP_Motors to get an automatic mask
|
||||
*/
|
||||
AP_Motors *motors = AP_Motors::get_instance();
|
||||
if (motors) {
|
||||
mask |= motors->get_motor_mask();
|
||||
if (channel_auto.get() == 1) {
|
||||
AP_Motors *motors = AP_Motors::get_instance();
|
||||
if (motors) {
|
||||
mask |= motors->get_motor_mask();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user