Skip to content

Commit

Permalink
Tools: add documentation for SIM_ENGINE_FAIL and SIM_ENGINE_MUL
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and rmackay9 committed Jul 30, 2024
1 parent 93704c5 commit 3c1021d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ArduCopter/crash_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void Copter::crash_check()
}

// return immediately if we are not in an angle stabilize flight mode or we are flipping
if (flightmode->disable_crash_check()) {
if (!flightmode->crash_check_enabled()) {
crash_counter = 0;
return;
}
Expand Down Expand Up @@ -273,7 +273,7 @@ void Copter::parachute_check()
}

// return immediately if we are not in an angle stabilize flight mode or we are flipping
if (flightmode->disable_crash_check()) {
if (!flightmode->crash_check_enabled()) {
control_loss_count = 0;
return;
}
Expand Down
6 changes: 3 additions & 3 deletions ArduCopter/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Mode {
virtual bool allows_save_trim() const { return false; }
virtual bool allows_autotune() const { return false; }
virtual bool allows_flip() const { return false; }
virtual bool disable_crash_check() const { return false; }
virtual bool crash_check_enabled() const { return true; }

#if FRAME_CONFIG == HELI_FRAME
virtual bool allows_inverted() const { return false; };
Expand Down Expand Up @@ -421,7 +421,7 @@ class ModeAcro : public Mode {
void air_mode_aux_changed();
bool allows_save_trim() const override { return true; }
bool allows_flip() const override { return true; }
bool disable_crash_check() const override { return true; }
bool crash_check_enabled() const override { return false; }

protected:

Expand Down Expand Up @@ -913,7 +913,7 @@ class ModeFlip : public Mode {
bool has_manual_throttle() const override { return false; }
bool allows_arming(AP_Arming::Method method) const override { return false; };
bool is_autopilot() const override { return false; }
bool disable_crash_check() const override { return true; }
bool crash_check_enabled() const override { return false; }

protected:

Expand Down
2 changes: 0 additions & 2 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2441,8 +2441,6 @@ def get_sim_parameter_documentation_get_whitelist(self):
"SIM_DRIFT_SPEED",
"SIM_DRIFT_TIME",
"SIM_EFI_TYPE",
"SIM_ENGINE_FAIL",
"SIM_ENGINE_MUL",
"SIM_ESC_ARM_RPM",
"SIM_FTOWESC_ENA",
"SIM_FTOWESC_POW",
Expand Down

0 comments on commit 3c1021d

Please sign in to comment.