Browse Source

Copter: move rc-channel option for lost-vehicle sound up to base class

master
Peter Barker 7 years ago committed by Randy Mackay
parent
commit
0f4c68aadb
  1. 14
      ArduCopter/RC_Channel.cpp
  2. 2
      ArduCopter/motors.cpp

14
ArduCopter/RC_Channel.cpp

@ -366,20 +366,6 @@ void RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const aux_sw @@ -366,20 +366,6 @@ void RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const aux_sw
}
break;
case LOST_COPTER_SOUND:
switch (ch_flag) {
case HIGH:
AP_Notify::flags.vehicle_lost = true;
break;
case MIDDLE:
// nothing
break;
case LOW:
AP_Notify::flags.vehicle_lost = false;
break;
}
break;
case MOTOR_ESTOP:
// Turn on Emergency Stop logic when channel is high
copter.set_motor_emergency_stop(ch_flag == HIGH);

2
ArduCopter/motors.cpp

@ -342,7 +342,7 @@ void Copter::lost_vehicle_check() @@ -342,7 +342,7 @@ void Copter::lost_vehicle_check()
static uint8_t soundalarm_counter;
// disable if aux switch is setup to vehicle alarm as the two could interfere
if (rc().find_channel_for_option(RC_Channel::aux_func::LOST_COPTER_SOUND)) {
if (rc().find_channel_for_option(RC_Channel::aux_func::LOST_VEHICLE_SOUND)) {
return;
}

Loading…
Cancel
Save