[SYS] Bump ESP32 platform to v6.1.0 and ESP8266 to v4.1.0 (#1547)

* Bump ESP32 platform to v6.1.0 and ESP8266 to v4.1.0

* Fix ESP32 not connecting to Ethernet

And remove check updates as it is now done every hour

* Do not define LED pins if not explicitly stated

* OLED need to be reset for Heltec Lora 32 V2

* Fix issue with SSD1306 saving
This commit is contained in:
Florian authored and GitHub committed 2023-03-23 11:24:49 -05:00
1 parent 537d4849e5
commit 86744b283b
6 files changed
+75 -55

No files matched your search

+7 -9
View File
@@ -174,10 +174,7 @@ void MQTTtoSSD1306(char* topicOri, JsonObject& SSD1306data) { // json object dec
}
// save, load, init, erase
if (SSD1306data.containsKey("save") && SSD1306data["save"]) {
success = SSD1306Config_save();
if (success) {
Log.notice(F("SSD1306 config saved" CR));
}
SSD1306Config_save();
} else if (SSD1306data.containsKey("load") && SSD1306data["load"]) {
success = SSD1306Config_load();
if (success) {
@@ -207,7 +204,7 @@ void MQTTtoSSD1306(char* topicOri, JsonObject& SSD1306data) { // json object dec
}
}
bool SSD1306Config_save() {
void SSD1306Config_save() {
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
JsonObject jo = jsonBuffer.to<JsonObject>();
jo["onstate"] = displayState;
@@ -223,6 +220,7 @@ bool SSD1306Config_save() {
preferences.begin(Gateway_Short_Name, false);
preferences.putString("SSD1306Config", conf);
preferences.end();
Log.notice(F("SSD1306 config saved" CR));
}
void SSD1306Config_init() {
@@ -827,10 +825,10 @@ OledSerial Oled(0); // Not sure about this, came from Hardwareserial
OledSerial::OledSerial(int x) {
displayQueue = xQueueCreate(5, sizeof(displayQueueMessage*));
# if defined(WIFI_Kit_32) || defined(WIFI_LoRa_32) || defined(WIFI_LoRa_32_V2)
// pinMode(RST_OLED, OUTPUT); // https://github.com/espressif/arduino-esp32/issues/4278
// digitalWrite(RST_OLED, LOW);
// delay(50);
// digitalWrite(RST_OLED, HIGH);
pinMode(RST_OLED, OUTPUT); // https://github.com/espressif/arduino-esp32/issues/4278
digitalWrite(RST_OLED, LOW);
delay(50);
digitalWrite(RST_OLED, HIGH);
display = new SSD1306Wire(0x3c, SDA_OLED, SCL_OLED, GEOMETRY_128_64);
# elif defined(Wireless_Stick)
// pinMode(RST_OLED, OUTPUT); // https://github.com/espressif/arduino-esp32/issues/4278