Skip to content

Commit

Permalink
Move logo display after power on check
Browse files Browse the repository at this point in the history
Fix #762
  • Loading branch information
nseidle committed May 10, 2024
1 parent e869349 commit 0e09e34
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Firmware/RTK_Surveyor/Begin.ino
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ void beginBoard()
settings.enablePrintBatteryMessages = false; // No pesky battery messages
}

displaySfeFlame();

char versionString[21];
getFirmwareVersion(versionString, sizeof(versionString), true);
systemPrintf("SparkFun RTK %s %s\r\n", platformPrefix, versionString);
Expand Down
30 changes: 19 additions & 11 deletions Firmware/RTK_Surveyor/Display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,7 @@ void beginDisplay()

systemPrintln("Display started");

// Display the SparkFun LOGO
oled.erase();
displayBitmap(0, 0, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
oled.display();
splashStart = millis();
return;
}

Expand All @@ -130,6 +126,18 @@ void beginDisplay()
systemPrintln("Display not detected");
}

// Display the SparkFun logo
void displaySfeFlame()
{
if (online.display == true)
{
oled.erase();
displayBitmap(0, 0, logoSparkFun_Width, logoSparkFun_Height, logoSparkFun);
oled.display();
splashStart = millis();
}
}

// Avoid code repetition
void displayBatteryVsEthernet()
{
Expand Down Expand Up @@ -1885,17 +1893,17 @@ void displayNoWiFi(uint16_t displayTime)

void displayNoSSIDs(uint16_t displayTime)
{
displayMessage("No SSIDs", displayTime);
displayMessage("No SSIDs", displayTime);
}

void displayAccountExpired(uint16_t displayTime)
{
displayMessage("Account Expired", displayTime);
displayMessage("Account Expired", displayTime);
}

void displayNotListed(uint16_t displayTime)
{
displayMessage("Not Listed", displayTime);
displayMessage("Not Listed", displayTime);
}

void displayRoverStart(uint16_t displayTime)
Expand Down Expand Up @@ -2042,11 +2050,11 @@ void displayWiFiConfig()
snprintf(mySSID, sizeof(mySSID), "%s", "RTK Config");
else
{
if(WiFi.getMode() == WIFI_STA)
if (WiFi.getMode() == WIFI_STA)
snprintf(mySSID, sizeof(mySSID), "%s", WiFi.SSID().c_str());

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

else
Expand Down Expand Up @@ -2444,7 +2452,7 @@ void paintSystemTest()
else
oled.print("FAIL");
} // End display 0
} // End Facet L-Band testing
} // End Facet L-Band testing
}
}

Expand Down

0 comments on commit 0e09e34

Please sign in to comment.