mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
fix landed state message priority
This commit is contained in:
parent
3802e1df1b
commit
ee4dd48a04
1 changed files with 5 additions and 4 deletions
|
@ -5644,9 +5644,7 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
|
||||||
const char *invertedInfoMessage = NULL;
|
const char *invertedInfoMessage = NULL;
|
||||||
|
|
||||||
if (ARMING_FLAG(ARMED)) {
|
if (ARMING_FLAG(ARMED)) {
|
||||||
if (STATE(LANDING_DETECTED)) {
|
if (FLIGHT_MODE(FAILSAFE_MODE) || FLIGHT_MODE(NAV_RTH_MODE) || FLIGHT_MODE(NAV_WP_MODE) || navigationIsExecutingAnEmergencyLanding()) {
|
||||||
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_LANDED);
|
|
||||||
} else if (FLIGHT_MODE(FAILSAFE_MODE) || FLIGHT_MODE(NAV_RTH_MODE) || FLIGHT_MODE(NAV_WP_MODE) || navigationIsExecutingAnEmergencyLanding()) {
|
|
||||||
/* ADDS MAXIMUM OF 5 MESSAGES TO TOTAL */
|
/* ADDS MAXIMUM OF 5 MESSAGES TO TOTAL */
|
||||||
if (navGetCurrentStateFlags() & NAV_AUTO_WP_DONE) {
|
if (navGetCurrentStateFlags() & NAV_AUTO_WP_DONE) {
|
||||||
messages[messageCount++] = STATE(LANDING_DETECTED) ? OSD_MESSAGE_STR(OSD_MSG_WP_LANDED) : OSD_MESSAGE_STR(OSD_MSG_WP_FINISHED);
|
messages[messageCount++] = STATE(LANDING_DETECTED) ? OSD_MESSAGE_STR(OSD_MSG_WP_LANDED) : OSD_MESSAGE_STR(OSD_MSG_WP_FINISHED);
|
||||||
|
@ -5703,7 +5701,10 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
|
||||||
// if RTH activated whilst WP mode selected, remind pilot to cancel WP mode to exit RTH
|
// if RTH activated whilst WP mode selected, remind pilot to cancel WP mode to exit RTH
|
||||||
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_WP_RTH_CANCEL);
|
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_WP_RTH_CANCEL);
|
||||||
}
|
}
|
||||||
} else { /* Messages shown only when Failsafe, WP, RTH or Emergency Landing not active */
|
} else if (STATE(LANDING_DETECTED)) {
|
||||||
|
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_LANDED);
|
||||||
|
} else {
|
||||||
|
/* Messages shown only when Failsafe, WP, RTH or Emergency Landing not active and landed state inactive */
|
||||||
/* ADDS MAXIMUM OF 4 MESSAGES TO TOTAL */
|
/* ADDS MAXIMUM OF 4 MESSAGES TO TOTAL */
|
||||||
if (STATE(AIRPLANE)) { /* ADDS MAXIMUM OF 3 MESSAGES TO TOTAL */
|
if (STATE(AIRPLANE)) { /* ADDS MAXIMUM OF 3 MESSAGES TO TOTAL */
|
||||||
#ifdef USE_FW_AUTOLAND
|
#ifdef USE_FW_AUTOLAND
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue