mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AC_Sprayer: turn on/off the spinner with the pump
This commit is contained in:
parent
74fb500efe
commit
c7464f635c
@ -148,11 +148,10 @@ AC_Sprayer::update()
|
||||
// if spraying update the pump servo position
|
||||
if (_spraying) {
|
||||
RC_Channel_aux::move_servo(RC_Channel_aux::k_sprayer_pump, min(ground_speed * _pump_pct_1ms,10000),0,10000);
|
||||
}else{
|
||||
// ensure sprayer is off
|
||||
RC_Channel_aux::set_radio_to_min(RC_Channel_aux::k_sprayer_pump);
|
||||
}
|
||||
|
||||
// send output to spinner servo
|
||||
RC_Channel_aux::set_radio(RC_Channel_aux::k_sprayer_spinner, _spinner_pwm);
|
||||
}else{
|
||||
// ensure sprayer and spinner are off
|
||||
RC_Channel_aux::set_radio_to_min(RC_Channel_aux::k_sprayer_pump);
|
||||
RC_Channel_aux::set_radio_to_min(RC_Channel_aux::k_sprayer_spinner);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user