mirror of
https://github.com/justcallmekoko/ESP32Marauder.git
synced 2025-12-22 07:10:47 -08:00
Add check ESP8266
This commit is contained in:
@@ -1057,7 +1057,7 @@ void MenuFunctions::RunSetup()
|
|||||||
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
wifi_scan_obj.currentScanMode = OTA_UPDATE;
|
||||||
changeMenu(&confirmMenu);
|
changeMenu(&confirmMenu);
|
||||||
});
|
});
|
||||||
addNodes(&whichUpdateMenu, "ESP8266 Update", TFT_RED, NULL, ESP_UPDATE_ICO, [this]() {
|
if (esp_obj.supported) addNodes(&whichUpdateMenu, "ESP8266 Update", TFT_RED, NULL, ESP_UPDATE_ICO, [this]() {
|
||||||
wifi_scan_obj.currentScanMode = ESP_UPDATE;
|
wifi_scan_obj.currentScanMode = ESP_UPDATE;
|
||||||
changeMenu(&espUpdateMenu);
|
changeMenu(&espUpdateMenu);
|
||||||
esp_obj.RunUpdate();
|
esp_obj.RunUpdate();
|
||||||
|
|||||||
@@ -76,8 +76,27 @@ void setup()
|
|||||||
//Serial.begin(115200);
|
//Serial.begin(115200);
|
||||||
|
|
||||||
display_obj.RunSetup();
|
display_obj.RunSetup();
|
||||||
|
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||||
|
|
||||||
|
digitalWrite(TFT_BL, LOW);
|
||||||
|
|
||||||
|
// Draw the title screen
|
||||||
|
display_obj.drawJpeg("/marauder3L.jpg", 0 , 0); // 240 x 320 image
|
||||||
|
|
||||||
|
//showCenterText(version_number, 250);
|
||||||
|
display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2);
|
||||||
|
|
||||||
|
digitalWrite(TFT_BL, HIGH); // Need this
|
||||||
|
|
||||||
|
delay(2000);
|
||||||
|
|
||||||
|
display_obj.clearScreen();
|
||||||
|
|
||||||
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
display_obj.tft.setTextColor(TFT_CYAN, TFT_BLACK);
|
||||||
digitalWrite(TFT_BL, HIGH);
|
|
||||||
|
display_obj.tft.println("Giving room for HardwareSerial...");
|
||||||
|
|
||||||
|
delay(2000);
|
||||||
|
|
||||||
display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
|
display_obj.tft.println("Marauder " + display_obj.version_number + "\n");
|
||||||
|
|
||||||
@@ -146,12 +165,14 @@ void setup()
|
|||||||
|
|
||||||
display_obj.tft.println(F("Initialized LED Interface"));
|
display_obj.tft.println(F("Initialized LED Interface"));
|
||||||
|
|
||||||
display_obj.tft.println(F("Starting..."));
|
//display_obj.tft.println(F("Starting..."));
|
||||||
|
|
||||||
delay(500);
|
delay(500);
|
||||||
|
|
||||||
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
//display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||||
|
|
||||||
|
// OG Logo Section
|
||||||
|
/*
|
||||||
digitalWrite(TFT_BL, LOW);
|
digitalWrite(TFT_BL, LOW);
|
||||||
|
|
||||||
// Draw the title screen
|
// Draw the title screen
|
||||||
@@ -161,11 +182,16 @@ void setup()
|
|||||||
display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2);
|
display_obj.tft.drawCentreString(display_obj.version_number, 120, 250, 2);
|
||||||
|
|
||||||
digitalWrite(TFT_BL, HIGH);
|
digitalWrite(TFT_BL, HIGH);
|
||||||
|
*/
|
||||||
|
|
||||||
esp_obj.begin();
|
esp_obj.begin();
|
||||||
|
|
||||||
a32u4_obj.begin(); // This goes last to make sure nothing is messed up when reading serial
|
a32u4_obj.begin(); // This goes last to make sure nothing is messed up when reading serial
|
||||||
|
|
||||||
|
display_obj.tft.println(F("Starting..."));
|
||||||
|
|
||||||
|
display_obj.tft.setTextColor(TFT_WHITE, TFT_BLACK);
|
||||||
|
|
||||||
delay(2000);
|
delay(2000);
|
||||||
|
|
||||||
menu_function_obj.RunSetup();
|
menu_function_obj.RunSetup();
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ void EspInterface::begin() {
|
|||||||
|
|
||||||
delay(100);
|
delay(100);
|
||||||
|
|
||||||
//display_obj.tft.println("Checking for ESP8266...");
|
display_obj.tft.println("Checking for ESP8266...");
|
||||||
|
|
||||||
this->bootRunMode();
|
this->bootRunMode();
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ void EspInterface::begin() {
|
|||||||
Serial.println("\nDisplay string: " + (String)display_string);
|
Serial.println("\nDisplay string: " + (String)display_string);
|
||||||
|
|
||||||
if (display_string == "ESP8266 Pong") {
|
if (display_string == "ESP8266 Pong") {
|
||||||
//display_obj.tft.println("ESP8266 Found!");
|
display_obj.tft.println("ESP8266 Found!");
|
||||||
Serial.println("ESP8266 Found!");
|
Serial.println("ESP8266 Found!");
|
||||||
this->supported = true;
|
this->supported = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user