|
|
|
@ -1885,9 +1885,18 @@ void QuadPlane::motors_output(bool run_rate_controller)
@@ -1885,9 +1885,18 @@ void QuadPlane::motors_output(bool run_rate_controller)
|
|
|
|
|
|
|
|
|
|
motors->output(); |
|
|
|
|
if (motors->armed() && motors->get_spool_state() != AP_Motors::SpoolState::SHUT_DOWN) { |
|
|
|
|
plane.logger.Write_Rate(ahrs_view, *motors, *attitude_control, *pos_control); |
|
|
|
|
Log_Write_QControl_Tuning(); |
|
|
|
|
const uint32_t now = AP_HAL::millis(); |
|
|
|
|
|
|
|
|
|
// log RATE at main loop rate
|
|
|
|
|
plane.logger.Write_Rate(ahrs_view, *motors, *attitude_control, *pos_control); |
|
|
|
|
|
|
|
|
|
// log QTUN at 25 Hz
|
|
|
|
|
if (now - last_qtun_log_ms > 40) { |
|
|
|
|
last_qtun_log_ms = now; |
|
|
|
|
Log_Write_QControl_Tuning(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// log CTRL at 10 Hz
|
|
|
|
|
if (now - last_ctrl_log_ms > 100) { |
|
|
|
|
last_ctrl_log_ms = now; |
|
|
|
|
attitude_control->control_monitor_log(); |
|
|
|
|