mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Merge pull request #3349 from iNavFlight/de_nav_motor_stop
New setting for disabling motor_stop in NAV modes
This commit is contained in:
commit
6cc3d2900d
5 changed files with 13 additions and 3 deletions
|
@ -163,6 +163,7 @@ After restoring it's always a good idea to `dump` or `diff` the settings once ag
|
||||||
| nav_land_slowdown_maxalt | 2000 | Defines at what altitude the descent velocity should start to ramp down from 100% nav_landing_speed to 25% nav_landing_speed. [cm] |
|
| nav_land_slowdown_maxalt | 2000 | Defines at what altitude the descent velocity should start to ramp down from 100% nav_landing_speed to 25% nav_landing_speed. [cm] |
|
||||||
| nav_emerg_landing_speed | 500 | Rate of descent UAV will try to maintain when doing emergency descent sequence [cm/s] |
|
| nav_emerg_landing_speed | 500 | Rate of descent UAV will try to maintain when doing emergency descent sequence [cm/s] |
|
||||||
| nav_min_rth_distance | 500 | Minimum distance from homepoint when RTH full procedure will be activated [cm]. Below this distance, the mode will activate at the current location and the final phase is executed (loiter / land). Above this distance, the full procedure is activated, which may include initial climb and flying directly to the homepoint before entering the loiter / land phase. |
|
| nav_min_rth_distance | 500 | Minimum distance from homepoint when RTH full procedure will be activated [cm]. Below this distance, the mode will activate at the current location and the final phase is executed (loiter / land). Above this distance, the full procedure is activated, which may include initial climb and flying directly to the homepoint before entering the loiter / land phase. |
|
||||||
|
| nav_overrides_motor_stop | ON | Setting to OFF combined with MOTOR_STOP feature will allow user to stop motor when in autonomous modes. On most places this setting is likely to cause a stall. |
|
||||||
| nav_rth_climb_first | ON | If set to ON drone will climb to nav_rth_altitude first and head home afterwards. If set to OFF drone will head home instantly and climb on the way. |
|
| nav_rth_climb_first | ON | If set to ON drone will climb to nav_rth_altitude first and head home afterwards. If set to OFF drone will head home instantly and climb on the way. |
|
||||||
| nav_rth_tail_first | OFF | If set to ON drone will return tail-first. Obviously meaningless for airplanes. |
|
| nav_rth_tail_first | OFF | If set to ON drone will return tail-first. Obviously meaningless for airplanes. |
|
||||||
| nav_rth_allow_landing | ALWAYS | If set to ON drone will land as a last phase of RTH. |
|
| nav_rth_allow_landing | ALWAYS | If set to ON drone will land as a last phase of RTH. |
|
||||||
|
|
|
@ -1262,6 +1262,9 @@ groups:
|
||||||
field: general.min_rth_distance
|
field: general.min_rth_distance
|
||||||
min: 0
|
min: 0
|
||||||
max: 5000
|
max: 5000
|
||||||
|
- name: nav_overrides_motor_stop
|
||||||
|
field: general.flags.auto_overrides_motor_stop
|
||||||
|
type: bool
|
||||||
- name: nav_rth_climb_first
|
- name: nav_rth_climb_first
|
||||||
field: general.flags.rth_climb_first
|
field: general.flags.rth_climb_first
|
||||||
type: bool
|
type: bool
|
||||||
|
|
|
@ -371,11 +371,15 @@ void mixTable(const float dT)
|
||||||
|
|
||||||
motorStatus_e getMotorStatus(void)
|
motorStatus_e getMotorStatus(void)
|
||||||
{
|
{
|
||||||
if (failsafeRequiresMotorStop() || (!failsafeIsActive() && STATE(NAV_MOTOR_STOP_OR_IDLE)))
|
if (failsafeRequiresMotorStop() || (!failsafeIsActive() && STATE(NAV_MOTOR_STOP_OR_IDLE))) {
|
||||||
return MOTOR_STOPPED_AUTO;
|
return MOTOR_STOPPED_AUTO;
|
||||||
|
}
|
||||||
|
|
||||||
if ((STATE(FIXED_WING) || !isAirmodeActive()) && (!navigationIsFlyingAutonomousMode()) && (!failsafeIsActive()) && (rcData[THROTTLE] < rxConfig()->mincheck))
|
if (rcData[THROTTLE] < rxConfig()->mincheck) {
|
||||||
return MOTOR_STOPPED_USER;
|
if ((STATE(FIXED_WING) || !isAirmodeActive()) && (!(navigationIsFlyingAutonomousMode() && navConfig()->general.flags.auto_overrides_motor_stop)) && (!failsafeIsActive())) {
|
||||||
|
return MOTOR_STOPPED_USER;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return MOTOR_RUNNING;
|
return MOTOR_RUNNING;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
|
||||||
.rth_tail_first = 0,
|
.rth_tail_first = 0,
|
||||||
.disarm_on_landing = 0,
|
.disarm_on_landing = 0,
|
||||||
.rth_allow_landing = NAV_RTH_ALLOW_LANDING_ALWAYS,
|
.rth_allow_landing = NAV_RTH_ALLOW_LANDING_ALWAYS,
|
||||||
|
.auto_overrides_motor_stop = 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
// General navigation parameters
|
// General navigation parameters
|
||||||
|
|
|
@ -126,6 +126,7 @@ typedef struct navConfig_s {
|
||||||
uint8_t disarm_on_landing; //
|
uint8_t disarm_on_landing; //
|
||||||
uint8_t rth_allow_landing; // Enable landing as last stage of RTH. Use constants in navRTHAllowLanding_e.
|
uint8_t rth_allow_landing; // Enable landing as last stage of RTH. Use constants in navRTHAllowLanding_e.
|
||||||
uint8_t rth_climb_ignore_emerg; // Option to ignore GPS loss on initial climb stage of RTH
|
uint8_t rth_climb_ignore_emerg; // Option to ignore GPS loss on initial climb stage of RTH
|
||||||
|
uint8_t auto_overrides_motor_stop; // Autonomous modes override motor_stop setting and user command to stop motor
|
||||||
} flags;
|
} flags;
|
||||||
|
|
||||||
uint8_t pos_failure_timeout; // Time to wait before switching to emergency landing (0 - disable)
|
uint8_t pos_failure_timeout; // Time to wait before switching to emergency landing (0 - disable)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue