Skip to content

Commit 5f901d2

Browse files
committed
Check ZED-F9R firmware in display test
1 parent 8a5b634 commit 5f901d2

File tree

3 files changed

+55
-38
lines changed

3 files changed

+55
-38
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 50 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,18 +2289,13 @@ void paintProfile(uint8_t profileUnit)
22892289
// External connections: Loop back test on DATA
22902290
void paintSystemTest()
22912291
{
2292+
static uint8_t systemTestDisplayNumber = 0; // Tracks which test screen we're looking at.
2293+
static unsigned long systemTestDisplayTime = millis(); // Timestamp for swapping the graphic during testing
2294+
22922295
if (online.display == true)
22932296
{
2294-
// Toggle between two displays
2295-
if (millis() - systemTestDisplayTime > 3000)
2296-
{
2297-
systemTestDisplayTime = millis();
2298-
systemTestDisplayNumber++;
2299-
systemTestDisplayNumber %= 2;
2300-
}
2301-
23022297
// Main info display
2303-
if (systemTestDisplayNumber == 1)
2298+
if (systemTestDisplayNumber == 0)
23042299
{
23052300
int xOffset = 2;
23062301
int yOffset = 2;
@@ -2312,13 +2307,27 @@ void paintSystemTest()
23122307
// Test SD, accel, batt, GNSS, mux
23132308
oled.setFont(QW_FONT_5X7); // Set font to smallest
23142309

2315-
oled.setCursor(xOffset, yOffset); // x, y
2310+
oled.setCursor(xOffset, yOffset + (0 * charHeight)); // x, y
23162311
oled.print("ZV:");
23172312
oled.print(zedFirmwareVersionInt);
2318-
if (zedFirmwareVersionInt < 150)
2319-
oled.print("-FAIL");
2320-
else
2321-
oled.print("-OK");
2313+
2314+
// ZED-F9P goes to 150
2315+
if (zedModuleType == PLATFORM_F9P)
2316+
{
2317+
if (zedFirmwareVersionInt < 150)
2318+
oled.print("-FAI");
2319+
else
2320+
oled.print("-OK");
2321+
}
2322+
2323+
// ZED-F9R goes to 130
2324+
else if (zedModuleType == PLATFORM_F9R)
2325+
{
2326+
if (zedFirmwareVersionInt < 130)
2327+
oled.print("-FAI");
2328+
else
2329+
oled.print("-OK");
2330+
}
23222331

23232332
oled.setCursor(xOffset, yOffset + (1 * charHeight)); // x, y
23242333
oled.print("SD:");
@@ -2339,8 +2348,9 @@ void paintSystemTest()
23392348
oled.print("FAIL");
23402349
}
23412350

2351+
//Check for satellites in view
23422352
oled.setCursor(xOffset, yOffset + (3 * charHeight)); // x, y
2343-
oled.print("GNSS:");
2353+
oled.print("SIV:");
23442354
if (online.gnss == true)
23452355
{
23462356
theGNSS.checkUblox(); // Regularly poll to get latest data and any RTCM
@@ -2421,30 +2431,38 @@ void paintSystemTest()
24212431
}
24222432
else
24232433
oled.print("OK");
2424-
} // End display 1
2434+
} // End display 0
24252435

24262436
// Display LBand Info
2427-
if (productVariant == RTK_FACET_LBAND)
2437+
if (systemTestDisplayNumber == 1)
24282438
{
2429-
if (systemTestDisplayNumber == 0)
2430-
{
2431-
int xOffset = 2;
2432-
int yOffset = 2;
2439+
int xOffset = 2;
2440+
int yOffset = 2;
24332441

2434-
int charHeight = 7;
2442+
int charHeight = 7;
24352443

2436-
drawFrame(); // Outside edge
2444+
drawFrame(); // Outside edge
24372445

2438-
// Test L-Band
2439-
oled.setFont(QW_FONT_5X7); // Set font to smallest
2446+
// Test L-Band
2447+
oled.setFont(QW_FONT_5X7); // Set font to smallest
24402448

2441-
oled.setCursor(xOffset, yOffset + (1 * charHeight)); // x, y
2442-
oled.print("LBand:");
2443-
if (online.lband == true)
2444-
oled.print("OK");
2445-
else
2446-
oled.print("FAIL");
2447-
} // End display 0
2449+
oled.setCursor(xOffset, yOffset + (0 * charHeight)); // x, y
2450+
oled.print("LBand:");
2451+
if (online.lband == true)
2452+
oled.print("OK");
2453+
else
2454+
oled.print("FAIL");
2455+
} // End display 1
2456+
2457+
if (productVariant == RTK_FACET_LBAND || productVariant == RTK_FACET_LBAND_DIRECT)
2458+
{
2459+
// Toggle between two displays
2460+
if (millis() - systemTestDisplayTime > 3000)
2461+
{
2462+
systemTestDisplayTime = millis();
2463+
systemTestDisplayNumber++;
2464+
systemTestDisplayNumber %= 2;
2465+
}
24482466
}
24492467
}
24502468
}

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,6 @@ bool lbandCorrectionsReceived = false; // Used to display L-Band SIV icon when c
673673
unsigned long lastLBandDecryption = 0; // Timestamp of last successfully decrypted PMP message
674674
volatile bool mqttMessageReceived = false; // Goes true when the subscribed MQTT channel reports back
675675
uint8_t leapSeconds = 0; // Gets set if GNSS is online
676-
unsigned long systemTestDisplayTime = 0; // Timestamp for swapping the graphic during testing
677-
uint8_t systemTestDisplayNumber = 0; // Tracks which test screen we're looking at
678676
unsigned long rtcWaitTime = 0; // At poweron, we give the RTC a few seconds to update during PointPerfect Key checking
679677

680678
TaskHandle_t idleTaskHandle[MAX_CPU_CORES];

Firmware/RTK_Surveyor/Tasks.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ void handleGnssDataTask(void *e)
953953
slowConsumer = "SD card";
954954
}
955955
} // bytesToSend
956-
} // End connected
956+
} // End connected
957957

958958
//----------------------------------------------------------------------
959959
// Update the available space in the ring buffer
@@ -1292,8 +1292,9 @@ void ButtonCheckTask(void *e)
12921292
powerDown(true); // State machine is not updated while in menu system so go straight to power down
12931293
// as needed
12941294
}
1295-
else if (powerBtn != nullptr && systemState == STATE_ROVER_NOT_STARTED && firstRoverStart == true &&
1296-
powerBtn->pressedFor(500))
1295+
else if (powerBtn != nullptr &&
1296+
(systemState == STATE_ROVER_NOT_STARTED || systemState == STATE_KEYS_STARTED) &&
1297+
firstRoverStart == true && powerBtn->pressedFor(500))
12971298
{
12981299
forceSystemStateUpdate = true;
12991300
requestChangeState(STATE_TEST);
@@ -1426,7 +1427,7 @@ void ButtonCheckTask(void *e)
14261427
}
14271428
} // End disableSetupButton check
14281429
}
1429-
} // End Platform = RTK Facet
1430+
} // End Platform = RTK Facet
14301431
else if (productVariant == REFERENCE_STATION) // Check one momentary button
14311432
{
14321433
if (setupBtn != nullptr)

0 commit comments

Comments
 (0)