Skip to content

Commit 257b0f1

Browse files
committed
Add LBand test to system status menu
1 parent 054de4c commit 257b0f1

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

Firmware/RTK_Surveyor/Display.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ void paintSIV()
545545
if (fixType == 3 || fixType == 4 || fixType == 5) //3D, 3D+DR, or Time
546546
{
547547
//Fix, turn on icon
548-
if (lbandCorrectionsDecrypted == false)
548+
if (lbandCorrectionsReceived == false)
549549
displayBitmap(2, 35, SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
550550
else
551551
displayBitmap(2, 35, SIV_Antenna_LBand_Width, SIV_Antenna_LBand_Height, SIV_Antenna_LBand);
@@ -561,7 +561,7 @@ void paintSIV()
561561
satelliteDishIconDisplayed = true;
562562

563563
//Draw the icon
564-
if (lbandCorrectionsDecrypted == false)
564+
if (lbandCorrectionsReceived == false)
565565
displayBitmap(2, 35, SIV_Antenna_Width, SIV_Antenna_Height, SIV_Antenna);
566566
else
567567
displayBitmap(2, 35, SIV_Antenna_LBand_Width, SIV_Antenna_LBand_Height, SIV_Antenna_LBand);

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ const uint32_t myLBandFreq = 1556290000; // Uncomment this line to use the US SP
379379
//const uint32_t myLBandFreq = 1545260000; // Uncomment this line to use the EU SPARTN 1.8 service
380380
const char* pointPerfectAPI = "https://api.thingstream.io/ztp/pointperfect/credentials";
381381
void checkRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct);
382+
float lBandEBNO = 0.0; //Used on system status menu
382383
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
383384

384385
//Global variables
@@ -467,7 +468,7 @@ int maxNtripClientConnectionAttempts = 3; //Give up connecting after this number
467468
bool ntripClientAttempted = false; //Goes true once we attempt WiFi. Allows graceful failure.
468469

469470
unsigned long startTime = 0; //Used for checking longest running functions
470-
bool lbandCorrectionsDecrypted = false; //Used to display LBand SIV icon when corrections are successfully decrypted
471+
bool lbandCorrectionsReceived = false; //Used to display LBand SIV icon when corrections are successfully decrypted
471472
unsigned long lastLBandDecryption = 0; //Timestamp of last successfully decrypted PMP message
472473
bool mqttMessageReceived = false; //Goes true when the subscribed MQTT channel reports back
473474
uint8_t leapSeconds = 0; //Gets set if GNSS is online

Firmware/RTK_Surveyor/menuPP.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,8 @@ void updateLBand()
770770
i2cLBand.checkUblox(); // Check for the arrival of new PMP data and process it.
771771
i2cLBand.checkCallbacks(); // Check if any LBand callbacks are waiting to be processed.
772772

773-
if (lbandCorrectionsDecrypted == true && millis() - lastLBandDecryption > 5000)
774-
lbandCorrectionsDecrypted = false;
773+
if (lbandCorrectionsReceived == true && millis() - lastLBandDecryption > 5000)
774+
lbandCorrectionsReceived = false;
775775
}
776776
}
777777

@@ -852,10 +852,11 @@ void applyLBandKeys()
852852
void checkRXMCOR(UBX_RXM_COR_data_t *ubxDataStruct)
853853
{
854854
log_d("LBand Eb/N0[dB] (>9 is good): %0.2f", ubxDataStruct->ebno * pow(2, -3));
855+
lBandEBNO = ubxDataStruct->ebno * pow(2, -3);
855856

856857
if (ubxDataStruct->statusInfo.bits.msgDecrypted == 2) //Successfully decrypted
857858
{
858-
lbandCorrectionsDecrypted = true;
859+
lbandCorrectionsReceived = true;
859860
lastLBandDecryption = millis();
860861
}
861862
}

Firmware/RTK_Surveyor/menuSystem.ino

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,26 @@ void menuSystem()
4343
if (online.microSD == true) Serial.println(F("Online"));
4444
else Serial.println(F("Offline"));
4545

46+
if (online.lband == true)
47+
{
48+
Serial.print(F("L-Band: Online - "));
49+
if (online.lbandCorrections == true) Serial.print(F("Keys Good"));
50+
else Serial.print(F("No Keys"));
51+
52+
if(lbandCorrectionsReceived == true) Serial.print(F(" / Corrections Received"));
53+
else Serial.print(F(" / Corrections Received Failed"));
54+
55+
Serial.printf(" / Eb/N0[dB] (>9 is good): %0.2f", lBandEBNO);
56+
Serial.println();
57+
}
58+
4659
//Display MAC address
4760
char macAddress[5];
4861
sprintf(macAddress, "%02X%02X", unitMACAddress[4], unitMACAddress[5]);
4962

50-
Serial.print(F("MAC: "));
63+
Serial.print(F("Bluetooth ("));
5164
Serial.print(macAddress);
52-
Serial.print(F(" - "));
65+
Serial.print(F("): "));
5366

5467
//Verify the ESP UART2 can communicate TX/RX to ZED UART1
5568
if (online.gnss == true)
@@ -67,15 +80,15 @@ void menuSystem()
6780
if (myGNSS.begin(serialGNSS) == true) //begin() attempts 3 connections
6881
{
6982
zedUartPassed = true;
70-
Serial.print(F("BT Online"));
83+
Serial.print(F("Online"));
7184
}
7285
else
73-
Serial.print(F("BT Offline"));
86+
Serial.print(F("Offline"));
7487

7588
startUART2Tasks(); //Return to normal operation
7689
}
7790
else
78-
Serial.print(F("BT Online"));
91+
Serial.print(F("Online"));
7992
}
8093
else
8194
{

0 commit comments

Comments
 (0)