Skip to content

Commit f4cb35e

Browse files
authored
Merge pull request #529 from LeeLeahy2/minor-changes
Minor changes: Add RTK_WIFI specific code and values, add macros and do some renaming
2 parents ae201aa + bff206e commit f4cb35e

18 files changed

+375
-307
lines changed

Firmware/RTK_Everywhere/Cellular.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void cellularEvent(arduino_event_id_t event)
8787
if (networkInterfaceHasInternet(NETWORK_CELLULAR) && (event != ARDUINO_EVENT_ETH_GOT_IP) &&
8888
(event != ARDUINO_EVENT_ETH_GOT_IP6) && (event != ARDUINO_EVENT_PPP_CONNECTED))
8989
{
90-
networkInterfaceInternetConnectionLost(NETWORK_CELLULAR);
90+
networkInterfaceEventInternetLost(NETWORK_CELLULAR);
9191
}
9292

9393
// Cellular State Machine
@@ -108,7 +108,7 @@ void cellularEvent(arduino_event_id_t event)
108108

109109
case ARDUINO_EVENT_PPP_CONNECTED:
110110
systemPrintln("Cellular Connected");
111-
networkInterfaceInternetConnectionAvailable(NETWORK_CELLULAR);
111+
networkInterfaceEventInternetAvailable(NETWORK_CELLULAR);
112112
break;
113113

114114
case ARDUINO_EVENT_PPP_DISCONNECTED:

Firmware/RTK_Everywhere/Developer.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,17 @@ void webServerUpdate() {}
177177

178178
#ifndef COMPILE_ESPNOW
179179

180-
bool espNowStart() {return false;}
181-
bool espNowStop() {return false;}
182-
180+
bool espnowGetState() {return ESPNOW_OFF;}
183181
bool espnowIsPaired() {return false;}
184182
void espnowProcessRTCM(byte incoming) {}
185183
esp_err_t espnowRemovePeer(uint8_t *peerMac) {return ESP_OK;}
186184
esp_err_t espnowSendPairMessage(uint8_t *sendToMac) {return ESP_OK;}
187185
bool espnowSetChannel(uint8_t channelNumber) {return false;}
188186
void espnowStart() {}
187+
#define ESPNOW_START() false
189188
void espnowStaticPairing() {}
190189
void espnowStop() {}
190+
#define ESPNOW_STOP() true
191191
void updateEspnow() {}
192192

193193
#endif // COMPILE_ESPNOW
@@ -202,7 +202,7 @@ void menuWiFi() {systemPrintln("**WiFi not compiled**");}
202202
bool wifiApIsRunning() {return false;}
203203
bool wifiConnect(bool startWiFiStation, bool startWiFiAP, unsigned long timeout) {return false;}
204204
uint32_t wifiGetStartTimeout() {return 0;}
205-
#define WIFI_IS_RUNNING()
205+
#define WIFI_IS_RUNNING() 0
206206
int wifiNetworkCount() {return 0;}
207207
void wifiResetThrottleTimeout() {}
208208
void wifiResetTimeout() {}

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");

0 commit comments

Comments
 (0)