Copter: call run rather than enable for sprayer

This commit is contained in:
Peter Barker 2016-10-27 16:29:13 +11:00 committed by Randy Mackay
parent 0cea47ae54
commit d877a00825

View File

@ -395,7 +395,7 @@ void Copter::do_aux_switch_function(int8_t ch_function, uint8_t ch_flag)
#endif
#if SPRAYER == ENABLED
case AUXSW_SPRAYER:
sprayer.enable(ch_flag == AUX_SWITCH_HIGH);
sprayer.run(ch_flag == AUX_SWITCH_HIGH);
// if we are disarmed the pilot must want to test the pump
sprayer.test_pump((ch_flag == AUX_SWITCH_HIGH) && !motors.armed());
break;