Browse Source

Copter: integrate sprayer pump test

mission-4.1.18
Randy Mackay 12 years ago
parent
commit
a68966e077
  1. 2
      ArduCopter/control_modes.pde
  2. 5
      ArduCopter/motors.pde

2
ArduCopter/control_modes.pde

@ -267,6 +267,8 @@ static void do_aux_switch_function(int8_t ch_function, uint8_t ch_flag) @@ -267,6 +267,8 @@ static void do_aux_switch_function(int8_t ch_function, uint8_t ch_flag)
#if SPRAYER == ENABLED
case AUX_SWITCH_SPRAYER:
sprayer.enable(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;
#endif

5
ArduCopter/motors.pde

@ -194,6 +194,11 @@ static void init_arm_motors() @@ -194,6 +194,11 @@ static void init_arm_motors()
return;
}
#if SPRAYER == ENABLED
// turn off sprayer's test if on
sprayer.test_pump(false);
#endif
// enable output to motors
output_min();

Loading…
Cancel
Save