Skip to content

Commit

Permalink
Sub: move servo calc logic to motors_output() and cork SRV_Channels f…
Browse files Browse the repository at this point in the history
…or improved performance
  • Loading branch information
Williangalvani committed Jun 28, 2024
1 parent b0d89c6 commit 2b60e93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ArduSub/ArduSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions ArduSub/motors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 2b60e93

Please sign in to comment.