1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-23 08:15:26 +03:00

Update master

This commit is contained in:
breadoven 2021-07-15 09:00:24 +01:00
parent 566d971026
commit e4554fa509
3 changed files with 8 additions and 6 deletions

View file

@ -56,6 +56,8 @@
#include "sensors/sensors.h" #include "sensors/sensors.h"
#include "sensors/acceleration.h" #include "sensors/acceleration.h"
#include "sensors/boardalignment.h" #include "sensors/boardalignment.h"
#include "sensors/battery.h"
// Multirotors: // Multirotors:
#define MR_RTH_CLIMB_OVERSHOOT_CM 100 // target this amount of cm *above* the target altitude to ensure it is actually reached (Vz > 0 at target alt) #define MR_RTH_CLIMB_OVERSHOOT_CM 100 // target this amount of cm *above* the target altitude to ensure it is actually reached (Vz > 0 at target alt)
@ -2564,7 +2566,7 @@ void updateLandingStatus(void)
disarm(DISARM_LANDING); disarm(DISARM_LANDING);
} else if (!navigationIsFlyingAutonomousMode()) { } else if (!navigationIsFlyingAutonomousMode()) {
// for multirotor only - reactivate landing detector without disarm when throttle raised toward hover throttle // for multirotor only - reactivate landing detector without disarm when throttle raised toward hover throttle
landingDetectorIsActive = rxGetChannelValue(THROTTLE) < (0.5 * (navConfig()->mc.hover_throttle + getThrottleIdleValue())); landingDetectorIsActive = rxGetChannelValue(THROTTLE) < (0.5 * (currentBatteryProfile->nav.mc.hover_throttle + getThrottleIdleValue()));
} }
} else if (isLandingDetected()) { } else if (isLandingDetected()) {
ENABLE_STATE(LANDING_DETECTED); ENABLE_STATE(LANDING_DETECTED);

View file

@ -599,7 +599,7 @@ bool isFixedWingFlying(void)
#ifdef USE_PITOT #ifdef USE_PITOT
airspeed = pitot.airSpeed; airspeed = pitot.airSpeed;
#endif #endif
bool throttleCondition = rcCommand[THROTTLE] > navConfig()->fw.cruise_throttle; bool throttleCondition = rcCommand[THROTTLE] > currentBatteryProfile->nav.fw.cruise_throttle;
bool velCondition = posControl.actualState.velXY > 250 || airspeed > 250; bool velCondition = posControl.actualState.velXY > 250 || airspeed > 250;
return isImuHeadingValid() && throttleCondition && velCondition; return isImuHeadingValid() && throttleCondition && velCondition;

View file

@ -677,7 +677,7 @@ static void applyMulticopterPositionController(timeUs_t currentTimeUs)
bool isMulticopterFlying(void) bool isMulticopterFlying(void)
{ {
bool throttleCondition = rcCommand[THROTTLE] > navConfig()->mc.hover_throttle; bool throttleCondition = rcCommand[THROTTLE] > currentBatteryProfile->nav.mc.hover_throttle;
bool gyroCondition = averageAbsGyroRates() > 7.0f; bool gyroCondition = averageAbsGyroRates() > 7.0f;
return throttleCondition && gyroCondition; return throttleCondition && gyroCondition;