mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 09:16:01 +03:00
Seems to be working. Not fancy but effective.
This commit is contained in:
parent
174540ad21
commit
ff4a6ecdd5
1 changed files with 5 additions and 2 deletions
|
@ -79,6 +79,7 @@
|
||||||
#include "flight/wind_estimator.h"
|
#include "flight/wind_estimator.h"
|
||||||
|
|
||||||
#include "navigation/navigation.h"
|
#include "navigation/navigation.h"
|
||||||
|
#include "navigation/navigation_private.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
|
@ -2002,9 +2003,9 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
const char *message = NULL;
|
const char *message = NULL;
|
||||||
char messageBuf[MAX(SETTING_MAX_NAME_LENGTH, OSD_MESSAGE_LENGTH+1)];
|
char messageBuf[MAX(SETTING_MAX_NAME_LENGTH, OSD_MESSAGE_LENGTH+1)];
|
||||||
if (ARMING_FLAG(ARMED)) {
|
if (ARMING_FLAG(ARMED)) {
|
||||||
// Aircraft is armed. We might have up to 4
|
// Aircraft is armed. We might have up to 5
|
||||||
// messages to show.
|
// messages to show.
|
||||||
const char *messages[4];
|
const char *messages[5];
|
||||||
unsigned messageCount = 0;
|
unsigned messageCount = 0;
|
||||||
if (FLIGHT_MODE(FAILSAFE_MODE)) {
|
if (FLIGHT_MODE(FAILSAFE_MODE)) {
|
||||||
// In FS mode while being armed too
|
// In FS mode while being armed too
|
||||||
|
@ -2040,6 +2041,8 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
if (navStateMessage) {
|
if (navStateMessage) {
|
||||||
messages[messageCount++] = navStateMessage;
|
messages[messageCount++] = navStateMessage;
|
||||||
}
|
}
|
||||||
|
} else if (STATE(FIXED_WING) && (navGetCurrentStateFlags() & NAV_CTL_LAUNCH)) {
|
||||||
|
messages[messageCount++] = "AUTOLAUNCH";
|
||||||
} else {
|
} else {
|
||||||
if (FLIGHT_MODE(NAV_ALTHOLD_MODE) && !navigationRequiresAngleMode()) {
|
if (FLIGHT_MODE(NAV_ALTHOLD_MODE) && !navigationRequiresAngleMode()) {
|
||||||
// ALTHOLD might be enabled alongside ANGLE/HORIZON/ACRO
|
// ALTHOLD might be enabled alongside ANGLE/HORIZON/ACRO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue