Skip to content

[Bug]: Location displayed as DEC regardless of configured setting #7970

Description

@RichieFrame

Category

Other

Hardware

T-Echo

Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?

  • Meshtastic UI aka MUI colorTFT
  • InkHUD ePaper
  • OLED slide UI on any display

Firmware Version

2.7.8.a0c0388

Description

on baseui, when the display location format is configured as MGRS, the display shows LAT/LONG in decimal format instead, I also tried DMS and UTM and they also displayed as decimal

It looks like this is why:
https://github.com/meshtastic/firmware/blob/develop/src/graphics/Screen.cpp#L999
https://github.com/meshtastic/firmware/blob/develop/src/graphics/draw/UIRenderer.cpp#L863
This code has no conversions from decimal:

        // === Third Row: Latitude ===
        char latStr[32];
        snprintf(latStr, sizeof(latStr), "Lat: %.5f", geoCoord.getLatitude() * 1e-7);
        display->drawString(x, getTextPositions(display)[line++], latStr);

        // === Fourth Row: Longitude ===
        char lonStr[32];
        snprintf(lonStr, sizeof(lonStr), "Lon: %.5f", geoCoord.getLongitude() * 1e-7);
        display->drawString(x, getTextPositions(display)[line++], lonStr);

The code that actually does conversions is no longer called by the UI:
https://github.com/meshtastic/firmware/blob/develop/src/graphics/draw/UIRenderer.cpp#L119

Metadata

Metadata

Assignees

Labels

baseuiIssues directly related to BaseUIbugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions