Browse Source

Blimp: remove armed_with_switch state

Unused state
zr-v5.1
Peter Barker 4 years ago committed by Peter Barker
parent
commit
ff02e619da
  1. 3
      Blimp/AP_Arming.cpp
  2. 2
      Blimp/Blimp.h
  3. 10
      Blimp/RC_Channel.cpp
  4. 1
      Blimp/RC_Channel.h

3
Blimp/AP_Arming.cpp

@ -421,9 +421,6 @@ bool AP_Arming_Blimp::arm(const AP_Arming::Method method, const bool do_arming_c
// Start the arming delay // Start the arming delay
blimp.ap.in_arming_delay = true; blimp.ap.in_arming_delay = true;
// assumed armed without a arming, switch. Overridden in switches.cpp
blimp.ap.armed_with_switch = false;
// return success // return success
return true; return true;
} }

2
Blimp/Blimp.h

@ -190,7 +190,7 @@ private:
uint8_t initialised_params : 1; // 24 // true when the all parameters have been initialised. we cannot send parameters to the GCS until this is done uint8_t initialised_params : 1; // 24 // true when the all parameters have been initialised. we cannot send parameters to the GCS until this is done
uint8_t unused3 : 1; // 25 // was compass_init_location; true when the compass's initial location has been set uint8_t unused3 : 1; // 25 // was compass_init_location; true when the compass's initial location has been set
uint8_t unused2 : 1; // 26 // aux switch rc_override is allowed uint8_t unused2 : 1; // 26 // aux switch rc_override is allowed
uint8_t armed_with_switch : 1; // 27 // we armed using a arming switch uint8_t unused4 : 1; // 27 // was "we armed using a arming switch"
}; };
uint32_t value; uint32_t value;
} ap_t; } ap_t;

10
Blimp/RC_Channel.cpp

@ -93,16 +93,6 @@ void RC_Channel_Blimp::do_aux_function_change_mode(const Mode::Number mode,
} }
} }
void RC_Channel_Blimp::do_aux_function_armdisarm(const AuxSwitchPos ch_flag)
{
RC_Channel::do_aux_function_armdisarm(ch_flag);
if (blimp.arming.is_armed()) {
// remember that we are using an arming switch, for use by
// set_throttle_zero_flag
blimp.ap.armed_with_switch = true;
}
}
// do_aux_function - implement the function invoked by auxiliary switches // do_aux_function - implement the function invoked by auxiliary switches
bool RC_Channel_Blimp::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos ch_flag) bool RC_Channel_Blimp::do_aux_function(const aux_func_t ch_option, const AuxSwitchPos ch_flag)
{ {

1
Blimp/RC_Channel.h

@ -16,7 +16,6 @@ protected:
private: private:
void do_aux_function_armdisarm(const AuxSwitchPos ch_flag) override;
void do_aux_function_change_mode(const Mode::Number mode, void do_aux_function_change_mode(const Mode::Number mode,
const AuxSwitchPos ch_flag); const AuxSwitchPos ch_flag);
void do_aux_function_change_air_mode(const AuxSwitchPos ch_flag); void do_aux_function_change_air_mode(const AuxSwitchPos ch_flag);

Loading…
Cancel
Save