Skip to content

Commit f6c0348

Browse files
committed
fix mission planner message
1 parent ee4dd48 commit f6c0348

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/io/osd.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5645,7 +5645,7 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
56455645

56465646
if (ARMING_FLAG(ARMED)) {
56475647
if (FLIGHT_MODE(FAILSAFE_MODE) || FLIGHT_MODE(NAV_RTH_MODE) || FLIGHT_MODE(NAV_WP_MODE) || navigationIsExecutingAnEmergencyLanding()) {
5648-
/* ADDS MAXIMUM OF 5 MESSAGES TO TOTAL */
5648+
/* ADDS MAXIMUM OF 3 MESSAGES TO TOTAL NORMALLY, 5 MESSAGES DURING FAILSAFE */
56495649
if (navGetCurrentStateFlags() & NAV_AUTO_WP_DONE) {
56505650
messages[messageCount++] = STATE(LANDING_DETECTED) ? OSD_MESSAGE_STR(OSD_MSG_WP_LANDED) : OSD_MESSAGE_STR(OSD_MSG_WP_FINISHED);
56515651
} else if (NAV_Status.state == MW_NAV_STATE_WP_ENROUTE) {
@@ -5705,7 +5705,7 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
57055705
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_LANDED);
57065706
} else {
57075707
/* Messages shown only when Failsafe, WP, RTH or Emergency Landing not active and landed state inactive */
5708-
/* ADDS MAXIMUM OF 4 MESSAGES TO TOTAL */
5708+
/* ADDS MAXIMUM OF 3 MESSAGES TO TOTAL */
57095709
if (STATE(AIRPLANE)) { /* ADDS MAXIMUM OF 3 MESSAGES TO TOTAL */
57105710
#ifdef USE_FW_AUTOLAND
57115711
if (canFwLandingBeCancelled()) {
@@ -5763,10 +5763,6 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
57635763
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_ALTITUDE_HOLD);
57645764
}
57655765
}
5766-
5767-
if (posControl.flags.wpMissionPlannerActive) {
5768-
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_MISSION_PLANNER);
5769-
}
57705766
}
57715767
} else if (ARMING_FLAG(ARMING_DISABLED_ALL_FLAGS)) { /* ADDS MAXIMUM OF 2 MESSAGES TO TOTAL */
57725768
unsigned invalidIndex;
@@ -5795,7 +5791,11 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
57955791
}
57965792
}
57975793

5798-
/* Messages that are shown regardless of Arming state - ADDS MAXIMUM OF 1 MESSAGES TO TOTAL */
5794+
/* Messages that are shown regardless of Arming state */
5795+
/* ADDS MAXIMUM OF 2 MESSAGES TO TOTAL NORMALLY, 1 MESSAGE DURING FAILSAFE */
5796+
if (posControl.flags.wpMissionPlannerActive && !FLIGHT_MODE(FAILSAFE_MODE)) {
5797+
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_MISSION_PLANNER);
5798+
}
57995799

58005800
// The following has been commented out as it will be added in #9688
58015801
// uint16_t rearmMs = (emergInflightRearmEnabled()) ? emergencyInFlightRearmTimeMS() : 0;

0 commit comments

Comments
 (0)