mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 15:03:33 +08:00
px4io: add support for test_motor
And fix some IO bugs: - PX4IO_P_STATUS_FLAGS_RAW_PWM was never cleared. This meant that after a 'pwm test' command, normal mixing was not possible anymore. Fixed by remembering when we are in test mode and not sending PX4IO_PAGE_CONTROLS during that time. PX4IO_P_STATUS_FLAGS_RAW_PWM is cleared when PX4IO_PAGE_CONTROLS are received. - when entering test mode w/o specifying all channels, the other channels were not set at all, which means they could still be set to values from a previous test call. This is fixed by setting all channels to disarmed when entering/leaving test mode.
This commit is contained in:
@@ -291,6 +291,8 @@ registers_set(uint8_t page, uint8_t offset, const uint16_t *values, unsigned num
|
||||
values++;
|
||||
}
|
||||
|
||||
r_status_flags &= ~PX4IO_P_STATUS_FLAGS_RAW_PWM;
|
||||
|
||||
system_state.fmu_data_received_time = hrt_absolute_time();
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user