Browse Source

Copter: start engine flag not used and style cleanup

gps-1.3.1
Bill Geyer 3 years ago committed by Randy Mackay
parent
commit
2fa54f0df4
  1. 1
      ArduCopter/Copter.h
  2. 15
      ArduCopter/RC_Channel.cpp

1
ArduCopter/Copter.h

@ -557,7 +557,6 @@ private: @@ -557,7 +557,6 @@ private:
uint8_t inverted_flight : 1; // 1 // true for inverted flight mode
uint8_t in_autorotation : 1; // 2 // true when heli is in autorotation
bool coll_stk_low ; // 3 // true when collective stick is on lower limit
uint8_t start_engine : 1; //3 //true for turbine start condition
} heli_flags_t;
heli_flags_t heli_flags;

15
ArduCopter/RC_Channel.cpp

@ -102,7 +102,7 @@ void RC_Channel_Copter::init_aux_function(const aux_func_t ch_option, const AuxS @@ -102,7 +102,7 @@ void RC_Channel_Copter::init_aux_function(const aux_func_t ch_option, const AuxS
case AUX_FUNC::TURTLE:
case AUX_FUNC::SIMPLE_HEADING_RESET:
case AUX_FUNC::ARMDISARM_AIRMODE:
case AUX_FUNC::TURB_START:
case AUX_FUNC::TURBINE_START:
break;
case AUX_FUNC::ACRO_TRAINER:
case AUX_FUNC::ATTCON_ACCEL_LIM:
@ -362,22 +362,21 @@ bool RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const AuxSwi @@ -362,22 +362,21 @@ bool RC_Channel_Copter::do_aux_function(const aux_func_t ch_option, const AuxSwi
#endif
break;
case AUX_FUNC::TURB_START:
#if FRAME_CONFIG == HELI_FRAME
case AUX_FUNC::TURBINE_START:
#if FRAME_CONFIG == HELI_FRAME
switch (ch_flag) {
case AuxSwitchPos::HIGH:
copter.motors->set_turb_start(true);
break;
case AuxSwitchPos::MIDDLE:
// nothing
break;
case AuxSwitchPos::LOW:
copter.motors->set_turb_start(false);
}
copter.motors->set_turb_start(false);
break;
}
#endif
break;
break;
case AUX_FUNC::BRAKE:
#if MODE_BRAKE_ENABLED == ENABLED

Loading…
Cancel
Save