Skip to content

Conversation

@MrD-RC
Copy link
Member

@MrD-RC MrD-RC commented Nov 2, 2025

User description

When the Geofence automated flight is active, it currently says AUTO in the OSD. It would be nicer if it were a bit more specific as to what is happening. So now will say GEO. This is also reflected in the CRSF telemetry and will be reflected in S.Port telemetry too,


PR Type

Enhancement


Description

  • Replace generic "AUTO" mode label with "GEO" for geofence flights

  • Updates OSD display to show specific geofence mode identifier

  • Updates CRSF telemetry to reflect geofence mode change


Diagram Walkthrough

flowchart LR
  OSD["OSD Display"]
  CRSF["CRSF Telemetry"]
  GEO["GEO Mode Label"]
  OSD -- "AUTO → GEO" --> GEO
  CRSF -- "AUTO → GEO" --> GEO
Loading

File Walkthrough

Relevant files
Enhancement
osd.c
Update OSD geofence mode label to GEO                                       

src/main/io/osd.c

  • Changed geofence flight mode display from "AUTO" to "GEO" in OSD
  • Updates NAV_SEND_TO flight mode string representation
  • Improves clarity of geofence automated flight status on screen
+1/-1     
crsf.c
Update CRSF telemetry geofence mode label                               

src/main/telemetry/crsf.c

  • Changed geofence flight mode from "AUTO" to "GEO" in CRSF telemetry
  • Updates NAV_SEND_TO flight mode string in telemetry frame
  • Ensures consistent geofence mode labeling across telemetry systems
+1/-1     

When the Geofence automated flight is active, it currently says `AUTO` in the OSD. It would be nicer if it were a bit more specific as to what is happening. So now will say `GEO`. This is also reflected in the CRSF telemetry and will be reflected in S.Port telemetry too,
@MrD-RC MrD-RC added this to the 9.0 milestone Nov 2, 2025
@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Nov 2, 2025

PR Compliance Guide 🔍

(Compliance updated until commit 2995205)

All compliance sections have been disabled in the configurations.


Previous compliance checks

Compliance check up to commit 2995205

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix incorrect flight mode priority

Restructure the flight mode display logic to prioritize checking for
FAILSAFE_MODE over other modes like NAV_FW_AUTOLAND and NAV_SEND_TO, ensuring
critical statuses are always displayed correctly.

src/main/io/osd.c [2557-2568]

-#ifdef USE_FW_AUTOLAND
-             if (FLIGHT_MODE(NAV_FW_AUTOLAND))
+#if defined(USE_FW_AUTOLAND) || defined(USE_GEOZONE)
+             if (FLIGHT_MODE(FAILSAFE_MODE))
+                 p = "!FS!";
+ #ifdef USE_FW_AUTOLAND
+             else if (FLIGHT_MODE(NAV_FW_AUTOLAND))
                  p = "LAND";
-             else
  #endif
  #ifdef USE_GEOZONE
-             if (FLIGHT_MODE(NAV_SEND_TO))
+             else if (FLIGHT_MODE(NAV_SEND_TO))
                  p = "GEO";
-             else
  #endif
+             else if (FLIGHT_MODE(ANGLE_MODE)) // This line is needed to correctly chain the logic
+ #else
              if (FLIGHT_MODE(FAILSAFE_MODE))
                  p = "!FS!";
+ #endif

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a critical logic flaw where FAILSAFE_MODE has a lower priority than other navigation modes, which could prevent the display of a critical failsafe status.

Medium
  • More

@MrD-RC MrD-RC merged commit 965dfe5 into master Nov 2, 2025
21 checks passed
@MrD-RC MrD-RC deleted the MrD_Update-Geofence-`AUTO`-mode-to-`GEO` branch November 2, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants