mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 01:18:29 -04:00
AP_MotorsUGV: remove arg from output_mainsail
no need to pass in argument which is always a local variable
This commit is contained in:
parent
23fd3b8f0e
commit
7163839117
@ -342,7 +342,7 @@ void AP_MotorsUGV::output(bool armed, float ground_speed, float dt)
|
|||||||
output_custom_config(armed, _steering, _throttle, _lateral);
|
output_custom_config(armed, _steering, _throttle, _lateral);
|
||||||
|
|
||||||
// output to mainsail
|
// output to mainsail
|
||||||
output_mainsail(_mainsail);
|
output_mainsail();
|
||||||
|
|
||||||
// send values to the PWM timers for output
|
// send values to the PWM timers for output
|
||||||
SRV_Channels::calc_pwm();
|
SRV_Channels::calc_pwm();
|
||||||
@ -777,13 +777,13 @@ void AP_MotorsUGV::output_throttle(SRV_Channel::Aux_servo_function_t function, f
|
|||||||
}
|
}
|
||||||
|
|
||||||
// output for sailboat's mainsail
|
// output for sailboat's mainsail
|
||||||
void AP_MotorsUGV::output_mainsail(float mainsail)
|
void AP_MotorsUGV::output_mainsail()
|
||||||
{
|
{
|
||||||
if (!has_sail()) {
|
if (!has_sail()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SRV_Channels::set_output_scaled(SRV_Channel::k_mainsail_sheet, constrain_float(mainsail, 0.0f, 100.0f));
|
SRV_Channels::set_output_scaled(SRV_Channel::k_mainsail_sheet, _mainsail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// slew limit throttle for one iteration
|
// slew limit throttle for one iteration
|
||||||
|
@ -137,7 +137,7 @@ protected:
|
|||||||
void output_throttle(SRV_Channel::Aux_servo_function_t function, float throttle, float dt = 0.0f);
|
void output_throttle(SRV_Channel::Aux_servo_function_t function, float throttle, float dt = 0.0f);
|
||||||
|
|
||||||
// output for sailboat's mainsail in the range of 0 to 100
|
// output for sailboat's mainsail in the range of 0 to 100
|
||||||
void output_mainsail(float mainsail);
|
void output_mainsail();
|
||||||
|
|
||||||
// slew limit throttle for one iteration
|
// slew limit throttle for one iteration
|
||||||
void slew_limit_throttle(float dt);
|
void slew_limit_throttle(float dt);
|
||||||
|
Loading…
Reference in New Issue
Block a user