RC_Channel: use HAL_SPRAYER_ENABLED
This commit is contained in:
parent
ce4120e803
commit
32221e2207
@ -678,6 +678,7 @@ void RC_Channel::do_aux_function_relay(const uint8_t relay, bool val)
|
||||
|
||||
void RC_Channel::do_aux_function_sprayer(const aux_switch_pos_t ch_flag)
|
||||
{
|
||||
#if HAL_SPRAYER_ENABLED
|
||||
AC_Sprayer *sprayer = AP::sprayer();
|
||||
if (sprayer == nullptr) {
|
||||
return;
|
||||
@ -686,6 +687,7 @@ void RC_Channel::do_aux_function_sprayer(const aux_switch_pos_t ch_flag)
|
||||
sprayer->run(ch_flag == HIGH);
|
||||
// if we are disarmed the pilot must want to test the pump
|
||||
sprayer->test_pump((ch_flag == HIGH) && !hal.util->get_soft_armed());
|
||||
#endif // HAL_SPRAYER_ENABLED
|
||||
}
|
||||
|
||||
void RC_Channel::do_aux_function_gripper(const aux_switch_pos_t ch_flag)
|
||||
|
Loading…
Reference in New Issue
Block a user