Skip to content

Commit

Permalink
Merge pull request iNavFlight#9934 from iNavFlight/release_7.1.1
Browse files Browse the repository at this point in the history
INAV 7.1.1
  • Loading branch information
DzikuVx authored May 7, 2024
2 parents 1dc9105 + 6eb6377 commit b45e962
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 164 deletions.
4 changes: 2 additions & 2 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -1814,11 +1814,11 @@ Allows to chose when the home position is reset. Can help prevent resetting home

### inav_use_gps_no_baro

_// TODO_
Defines if INAV should use only use GPS data for altitude estimation when barometer is not available. If set to ON, INAV will allow GPS assisted modes and RTH even when there is no barometer installed.

| Default | Min | Max |
| --- | --- | --- |
| OFF | OFF | ON |
| ON | OFF | ON |

---

Expand Down
10 changes: 8 additions & 2 deletions src/main/blackbox/blackbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,10 +1308,16 @@ static void writeSlowFrame(void)
static void loadSlowState(blackboxSlowState_t *slow)
{
memcpy(&slow->flightModeFlags, &rcModeActivationMask, sizeof(slow->flightModeFlags)); //was flightModeFlags;
// Also log Nav auto selected flight modes rather than just those selected by boxmode
if (!IS_RC_MODE_ACTIVE(BOXANGLE) && FLIGHT_MODE(ANGLE_MODE)) {
// Also log Nav auto enabled flight modes rather than just those selected by boxmode
if (FLIGHT_MODE(ANGLE_MODE)) {
slow->flightModeFlags |= (1 << BOXANGLE);
}
if (FLIGHT_MODE(NAV_ALTHOLD_MODE)) {
slow->flightModeFlags |= (1 << BOXNAVALTHOLD);
}
if (FLIGHT_MODE(NAV_RTH_MODE)) {
slow->flightModeFlags |= (1 << BOXNAVRTH);
}
if (navigationGetHeadingControlState() == NAV_HEADING_CONTROL_AUTO) {
slow->flightModeFlags |= (1 << BOXHEADINGHOLD);
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/fc/fc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ static void updateArmingStatus(void)
DISABLE_ARMING_FLAG(ARMING_DISABLED_NO_PREARM);
}

if (ARMING_FLAG(ARMING_DISABLED_LANDING_DETECTED) && !IS_RC_MODE_ACTIVE(BOXARM)) {
DISABLE_ARMING_FLAG(ARMING_DISABLED_LANDING_DETECTED);
}

/* CHECK: Arming switch */
// If arming is disabled and the ARM switch is on
// Note that this should be last check so all other blockers could be cleared correctly
Expand Down
1 change: 0 additions & 1 deletion src/main/fc/fc_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
#include "drivers/pwm_esc_detect.h"
#include "drivers/pwm_mapping.h"
#include "drivers/pwm_output.h"
#include "drivers/pwm_output.h"
#include "drivers/sensor.h"
#include "drivers/serial.h"
#include "drivers/serial_softserial.h"
Expand Down
3 changes: 2 additions & 1 deletion src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2266,9 +2266,10 @@ groups:
min: 0
max: 255
- name: inav_use_gps_no_baro
description: "Defines if INAV should use only use GPS data for altitude estimation when barometer is not available. If set to ON, INAV will allow GPS assisted modes and RTH even when there is no barometer installed."
field: use_gps_no_baro
type: bool
default_value: OFF
default_value: ON
- name: inav_allow_dead_reckoning
description: "Defines if INAV will dead-reckon over short GPS outages. May also be useful for indoors OPFLOW navigation"
default_value: OFF
Expand Down
17 changes: 10 additions & 7 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ static const char * divertingToSafehomeMessage(void)
return OSD_MESSAGE_STR(OSD_MSG_DIVERT_SAFEHOME);
}
#endif
return NULL;
return NULL;
}


Expand All @@ -1047,7 +1047,7 @@ static const char * navigationStateMessage(void)
linearDescentMessageMs = millis() + 5000; // Show message for 5 seconds.

return OSD_MESSAGE_STR(OSD_MSG_RTH_LINEAR_DESCENT);
} else
} else
return OSD_MESSAGE_STR(OSD_MSG_HEADING_HOME);
}
case MW_NAV_STATE_HOLD_INFINIT:
Expand Down Expand Up @@ -1088,7 +1088,7 @@ static const char * navigationStateMessage(void)
// If there is a FS landing delay occurring. That is handled by the calling function.
if (posControl.landingDelay > 0)
break;

return OSD_MESSAGE_STR(OSD_MSG_PREPARING_LAND);
}
case MW_NAV_STATE_LAND_START_DESCENT:
Expand Down Expand Up @@ -2401,7 +2401,7 @@ static bool osdDrawSingleElement(uint8_t item)
{
char *p = "ACRO";
#ifdef USE_FW_AUTOLAND
if (FLIGHT_MODE(NAV_FW_AUTOLAND))
if (FLIGHT_MODE(NAV_FW_AUTOLAND))
p = "LAND";
else
#endif
Expand Down Expand Up @@ -5404,6 +5404,7 @@ static void osdRefresh(timeUs_t currentTimeUs)
static uint8_t statsCurrentPage = 0;
static bool statsDisplayed = false;
static bool statsAutoPagingEnabled = true;
static bool isThrottleHigh = false;

// Detect arm/disarm
if (armState != ARMING_FLAG(ARMED)) {
Expand All @@ -5429,6 +5430,7 @@ static void osdRefresh(timeUs_t currentTimeUs)
statsAutoPagingEnabled = osdConfig()->stats_page_auto_swap_time > 0 ? true : false;
osdShowStats(statsSinglePageCompatible, statsCurrentPage);
osdSetNextRefreshIn(STATS_SCREEN_DISPLAY_TIME);
isThrottleHigh = checkStickPosition(THR_HI);
}

armState = ARMING_FLAG(ARMED);
Expand Down Expand Up @@ -5494,7 +5496,7 @@ static void osdRefresh(timeUs_t currentTimeUs)
}

// Handle events when either "Splash", "Armed" or "Stats" screens are displayed.
if ((currentTimeUs > resumeRefreshAt) || OSD_RESUME_UPDATES_STICK_COMMAND) {
if (currentTimeUs > resumeRefreshAt || (OSD_RESUME_UPDATES_STICK_COMMAND && !isThrottleHigh)) {
// Time elapsed or canceled by stick commands.
// Exit to normal OSD operation.
displayClearScreen(osdDisplayPort);
Expand All @@ -5503,6 +5505,7 @@ static void osdRefresh(timeUs_t currentTimeUs)
} else {
// Continue "Splash", "Armed" or "Stats" screens.
displayHeartbeat(osdDisplayPort);
isThrottleHigh = checkStickPosition(THR_HI);
}

return;
Expand Down Expand Up @@ -5717,11 +5720,11 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
tfp_sprintf(messageBuf, "LANDING DELAY: %3u SECONDS", remainingHoldSec);

messages[messageCount++] = messageBuf;
}
}

else {
#ifdef USE_FW_AUTOLAND
if (canFwLandCanceld()) {
if (canFwLandingBeCancelled()) {
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_MOVE_STICKS);
} else if (!FLIGHT_MODE(NAV_FW_AUTOLAND)) {
#endif
Expand Down
Loading

0 comments on commit b45e962

Please sign in to comment.