Sub: move servo calc logic to motors_output() and cork SRV_Channels for improved performance

This commit is contained in:
Willian Galvani 2024-06-21 20:15:16 -03:00
parent b0d89c6862
commit 2b60e93410
2 changed files with 4 additions and 3 deletions

View File

@ -158,10 +158,7 @@ void Sub::fifty_hz_loop()
failsafe_sensors_check();
// Update rc input/output
rc().read_input();
SRV_Channels::calc_pwm();
SRV_Channels::output_ch_all();
}
// update_batt_compass - read battery and compass

View File

@ -18,7 +18,11 @@ void Sub::motors_output()
verify_motor_test();
} else {
motors.set_interlock(true);
SRV_Channels::cork();
SRV_Channels::calc_pwm();
SRV_Channels::output_ch_all();
motors.output();
SRV_Channels::push();
}
}