Skip to content

Commit 49bdce7

Browse files
committed
Update paintSystemTest for the mosaic-X5
1 parent 3f3dea9 commit 49bdce7

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

Firmware/RTK_Everywhere/Display.ino

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2387,15 +2387,31 @@ void paintSystemTest()
23872387
drawFrame(); // Outside edge
23882388

23892389
oled->setFont(QW_FONT_5X7); // Set font to smallest
2390-
oled->setCursor(xOffset, yOffset); // x, y
2391-
oled->print("SD:");
23922390

2393-
if (online.microSD == false)
2394-
beginSD(); // Test if SD is present
2395-
if (online.microSD == true)
2396-
oled->print("OK");
2397-
else
2398-
oled->print("FAIL");
2391+
if (present.microSD)
2392+
{
2393+
oled->setCursor(xOffset, yOffset); // x, y
2394+
oled->print("SD:");
2395+
2396+
if (online.microSD == false)
2397+
beginSD(); // Test if SD is present
2398+
if (online.microSD == true)
2399+
oled->print("OK");
2400+
else
2401+
oled->print("FAIL");
2402+
}
2403+
else if (present.gnss_mosaicX5)
2404+
{
2405+
// Facet mosaic has an SD card, but it is connected directly to the mosaic-X5
2406+
// Calling gnss->update() during the GNSS check will cause sdCardSize to be updated
2407+
oled->setCursor(xOffset, yOffset); // x, y
2408+
oled->print("SD:");
2409+
2410+
if (sdCardSize > 0)
2411+
oled->print("OK");
2412+
else
2413+
oled->print("FAIL");
2414+
}
23992415

24002416
if (present.fuelgauge_max17048 || present.fuelgauge_bq40z50)
24012417
{
@@ -2510,14 +2526,14 @@ void paintSystemTest()
25102526
oled->print(" ");
25112527
oled->print(gnssFirmwareVersionInt);
25122528
oled->print("-");
2513-
if ((present.gnss_zedf9p) && (gnssFirmwareVersionInt < 130))
2529+
if ((present.gnss_zedf9p) && (gnssFirmwareVersionInt < 150))
25142530
oled->print("FAIL");
25152531
else
25162532
oled->print("OK");
25172533

25182534
oled->setCursor(xOffset, yOffset + (2 * charHeight)); // x, y
25192535
oled->print("LBand:");
2520-
if (online.lband_neo == true)
2536+
if ((online.lband_neo == true) || (present.gnss_mosaicX5))
25212537
oled->print("OK");
25222538
else
25232539
oled->print("FAIL");

Firmware/RTK_Everywhere/GNSS_Mosaic.ino

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2646,9 +2646,17 @@ void processSBFReceiverSetup(SEMP_PARSE_STATE *parse, uint16_t type)
26462646
if (sempSbfGetBlockNumber(parse) == 5902)
26472647
{
26482648
snprintf(gnssUniqueId, sizeof(gnssUniqueId), "%s", sempSbfGetString(parse, 156)); // Extract RxSerialNumber
2649+
26492650
snprintf(gnssFirmwareVersion, sizeof(gnssFirmwareVersion), "%s",
26502651
sempSbfGetString(parse, 196)); // Extract RXVersion
26512652

2653+
// gnssFirmwareVersion is 4.14.4, 4.14.10.1, etc.
2654+
// Create gnssFirmwareVersionInt from the first two fields only so it will fit on the OLED
2655+
int verMajor = 0;
2656+
int verMinor = 0;
2657+
sscanf(gnssFirmwareVersion, "%d.%d.", &verMajor, &verMinor); // Do we care if this fails?
2658+
gnssFirmwareVersionInt = (verMajor * 100) + verMinor;
2659+
26522660
GNSS_MOSAIC *mosaic = (GNSS_MOSAIC *)gnss;
26532661
mosaic->_receiverSetupSeen = true;
26542662
}

0 commit comments

Comments
 (0)