Skip to content

Commit 0e09e34

Browse files
committed
Move logo display after power on check
Fix #762
1 parent e869349 commit 0e09e34

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ void beginBoard()
283283
settings.enablePrintBatteryMessages = false; // No pesky battery messages
284284
}
285285

286+
displaySfeFlame();
287+
286288
char versionString[21];
287289
getFirmwareVersion(versionString, sizeof(versionString), true);
288290
systemPrintf("SparkFun RTK %s %s\r\n", platformPrefix, versionString);

Firmware/RTK_Surveyor/Display.ino

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,7 @@ void beginDisplay()
116116

117117
systemPrintln("Display started");
118118

119-
// Display the SparkFun LOGO
120119
oled.erase();
121-
displayBitmap(0, 0, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
122-
oled.display();
123-
splashStart = millis();
124120
return;
125121
}
126122

@@ -130,6 +126,18 @@ void beginDisplay()
130126
systemPrintln("Display not detected");
131127
}
132128

129+
// Display the SparkFun logo
130+
void displaySfeFlame()
131+
{
132+
if (online.display == true)
133+
{
134+
oled.erase();
135+
displayBitmap(0, 0, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
136+
oled.display();
137+
splashStart = millis();
138+
}
139+
}
140+
133141
// Avoid code repetition
134142
void displayBatteryVsEthernet()
135143
{
@@ -1885,17 +1893,17 @@ void displayNoWiFi(uint16_t displayTime)
18851893

18861894
void displayNoSSIDs(uint16_t displayTime)
18871895
{
1888-
displayMessage("No SSIDs", displayTime);
1896+
displayMessage("No SSIDs", displayTime);
18891897
}
18901898

18911899
void displayAccountExpired(uint16_t displayTime)
18921900
{
1893-
displayMessage("Account Expired", displayTime);
1901+
displayMessage("Account Expired", displayTime);
18941902
}
18951903

18961904
void displayNotListed(uint16_t displayTime)
18971905
{
1898-
displayMessage("Not Listed", displayTime);
1906+
displayMessage("Not Listed", displayTime);
18991907
}
19001908

19011909
void displayRoverStart(uint16_t displayTime)
@@ -2042,11 +2050,11 @@ void displayWiFiConfig()
20422050
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
20432051
else
20442052
{
2045-
if(WiFi.getMode() == WIFI_STA)
2053+
if (WiFi.getMode() == WIFI_STA)
20462054
snprintf(mySSID, sizeof(mySSID), "%s", WiFi.SSID().c_str());
20472055

2048-
//If we failed to connect to a friendly WiFi, and then fell back to AP mode, still display RTK Config
2049-
else if(WiFi.getMode() == WIFI_AP)
2056+
// If we failed to connect to a friendly WiFi, and then fell back to AP mode, still display RTK Config
2057+
else if (WiFi.getMode() == WIFI_AP)
20502058
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
20512059

20522060
else
@@ -2444,7 +2452,7 @@ void paintSystemTest()
24442452
else
24452453
oled.print("FAIL");
24462454
} // End display 0
2447-
} // End Facet L-Band testing
2455+
} // End Facet L-Band testing
24482456
}
24492457
}
24502458

0 commit comments

Comments
 (0)