mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-09 16:41:21 +08:00
AP_HAL_ChibiOS: add iomcu support for reversible mask
check armed state on iomcu before sending dshot packets
This commit is contained in:
1 parent
e21e098aa9
commit
fc51829b63
2 files changed
+9
-4
No files matched your search
@@ -1637,9 +1637,8 @@ void RCOutput::dshot_send(pwm_group &group, rcout_timer_t cycle_start_us, rcout_
|
||||
bdshot_prepare_for_next_pulse(group);
|
||||
#endif
|
||||
bool safety_on = hal.util->safety_switch_state() == AP_HAL::Util::SAFETY_DISARMED;
|
||||
#if !defined(IOMCU_FW)
|
||||
bool armed = hal.util->get_soft_armed();
|
||||
#endif
|
||||
|
||||
memset((uint8_t *)group.dma_buffer, 0, DSHOT_BUFFER_LENGTH);
|
||||
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
@@ -1683,12 +1682,12 @@ void RCOutput::dshot_send(pwm_group &group, rcout_timer_t cycle_start_us, rcout_
|
||||
if (value != 0) {
|
||||
value += DSHOT_ZERO_THROTTLE;
|
||||
}
|
||||
#if !defined(IOMCU_FW)
|
||||
|
||||
if (!armed) {
|
||||
// when disarmed we always send a zero value
|
||||
value = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// according to sskaug requesting telemetry while trying to arm may interfere with the good frame calc
|
||||
bool request_telemetry = telem_request_mask & chan_mask;
|
||||
uint16_t packet = create_dshot_packet(value, request_telemetry,
|
||||
|
||||
Reference in new issue
Block a user