Skip to content

Commit

Permalink
Adjust info/warning status (betaflight#14088)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCEvans authored Dec 16, 2024
1 parent aab2138 commit 5dc5a8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/osd/osd_elements.c
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ static void osdElementCrashFlipArrow(osdElementParms_t *element)
}

if ((isCrashFlipModeActive() || (!ARMING_FLAG(ARMED) && !isUpright())) && !((imuConfig()->small_angle < 180 && isUpright()) || (rollAngle == 0 && pitchAngle == 0))) {
element->attr = DISPLAYPORT_SEVERITY_INFO;
if (abs(pitchAngle) < 2 * abs(rollAngle) && abs(rollAngle) < 2 * abs(pitchAngle)) {
if (pitchAngle > 0) {
if (rollAngle > 0) {
Expand Down Expand Up @@ -1167,7 +1168,7 @@ static void osdElementGpsSats(osdElementParms_t *element)
}
#endif
else {
element->attr = DISPLAYPORT_SEVERITY_INFO;
element->attr = DISPLAYPORT_SEVERITY_NORMAL;
}

if (!gpsIsHealthy()) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/osd/osd_warnings.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void renderOsdWarning(char *warningText, bool *blinking, uint8_t *displayAttr)
if (osdWarnGetState(OSD_WARNING_CRASHFLIP) && IS_RC_MODE_ACTIVE(BOXCRASHFLIP)) {
if (isCrashFlipModeActive()) { // if was armed in crashflip mode
tfp_sprintf(warningText, CRASHFLIP_WARNING);
*displayAttr = DISPLAYPORT_SEVERITY_INFO;
*displayAttr = DISPLAYPORT_SEVERITY_WARNING;
return;
} else if (!ARMING_FLAG(ARMED)) { // if disarmed, but crashflip mode is activated (not allowed / can't happen)
tfp_sprintf(warningText, "CRASHFLIP SW");
Expand Down Expand Up @@ -420,7 +420,7 @@ void renderOsdWarning(char *warningText, bool *blinking, uint8_t *displayAttr)
if (osdWarnGetState(OSD_WARNING_BATTERY_NOT_FULL) && !(ARMING_FLAG(ARMED) || ARMING_FLAG(WAS_EVER_ARMED)) && (getBatteryState() == BATTERY_OK)
&& getBatteryAverageCellVoltage() < batteryConfig()->vbatfullcellvoltage) {
tfp_sprintf(warningText, "BATT < FULL");
*displayAttr = DISPLAYPORT_SEVERITY_INFO;
*displayAttr = DISPLAYPORT_SEVERITY_WARNING;
return;
}

Expand Down

0 comments on commit 5dc5a8e

Please sign in to comment.