final fixes before Release for DE XI
This commit is contained in:
parent
a92b1edfd9
commit
e6f1283aae
Software
Binary file not shown.
Before ![]() (image error) Size: 37 KiB After ![]() (image error) Size: 34 KiB ![]() ![]() |
Binary file not shown.
Before ![]() (image error) Size: 34 KiB After ![]() (image error) Size: 37 KiB ![]() ![]() |
@ -27,7 +27,7 @@ upload_speed = 921600
|
|||||||
build_flags=
|
build_flags=
|
||||||
!python git_rev_macro.py
|
!python git_rev_macro.py
|
||||||
-DATOMIC_FS_UPDATE
|
-DATOMIC_FS_UPDATE
|
||||||
-DFEATURE_ENABLE_WIFI_CLIENT
|
;-DFEATURE_ENABLE_WIFI_CLIENT
|
||||||
;-DFEATURE_ENABLE_LORA
|
;-DFEATURE_ENABLE_LORA
|
||||||
;-DCAPTIVE
|
;-DCAPTIVE
|
||||||
-DWIFI_AP_IP_GW=10,0,0,1
|
-DWIFI_AP_IP_GW=10,0,0,1
|
||||||
|
@ -289,19 +289,19 @@ void SevenSeg_Output()
|
|||||||
disp_FAC_1.refresh();
|
disp_FAC_1.refresh();
|
||||||
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_1_timer / 60);
|
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_1_timer / 60);
|
||||||
disp_FAC_1.display(String(sevenSegBuff), false, false);
|
disp_FAC_1.display(String(sevenSegBuff), false, false);
|
||||||
disp_FAC_1.setDp((PersistenceData.activeFaction == FACTION_1) && (millis() % 1000 > 500));
|
disp_FAC_1.setDp((PersistenceData.activeFaction == FACTION_1) && (millis() % 1000 > 500) ? 0x08 : 0x00);
|
||||||
|
|
||||||
disp_FAC_2.setBrightness(PersistenceData.activeFaction == FACTION_2 ? 5 : 1);
|
disp_FAC_2.setBrightness(PersistenceData.activeFaction == FACTION_2 ? 5 : 1);
|
||||||
disp_FAC_2.refresh();
|
disp_FAC_2.refresh();
|
||||||
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_2_timer / 60);
|
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_2_timer / 60);
|
||||||
disp_FAC_2.display(String(sevenSegBuff), false, false);
|
disp_FAC_2.display(String(sevenSegBuff), false, false);
|
||||||
disp_FAC_2.setDp((PersistenceData.activeFaction == FACTION_2) && (millis() % 1000 > 500));
|
disp_FAC_2.setDp((PersistenceData.activeFaction == FACTION_2) && (millis() % 1000 > 500) ? 0x08 : 0x00);
|
||||||
|
|
||||||
disp_FAC_3.setBrightness(PersistenceData.activeFaction == FACTION_3 ? 5 : 1);
|
disp_FAC_3.setBrightness(PersistenceData.activeFaction == FACTION_3 ? 5 : 1);
|
||||||
disp_FAC_3.refresh();
|
disp_FAC_3.refresh();
|
||||||
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_3_timer / 60);
|
snprintf(sevenSegBuff, sizeof(sevenSegBuff), "%4d", PersistenceData.faction_3_timer / 60);
|
||||||
disp_FAC_3.display(String(sevenSegBuff), false, false);
|
disp_FAC_3.display(String(sevenSegBuff), false, false);
|
||||||
disp_FAC_3.setDp((PersistenceData.activeFaction == FACTION_3) && (millis() % 1000 > 500));
|
disp_FAC_3.setDp((PersistenceData.activeFaction == FACTION_3) && (millis() % 1000 > 500) ? 0x08 : 0x00);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -344,7 +344,7 @@ void tmrCallback_InputGetter()
|
|||||||
|
|
||||||
if (keysPressed > 1)
|
if (keysPressed > 1)
|
||||||
{
|
{
|
||||||
Serial.println("ERROR: More than one Flag active - setting no Faction active");
|
Debug_pushMessage("ERROR: More than one Flag active - setting no Faction active");
|
||||||
PersistenceData.activeFaction = NONE;
|
PersistenceData.activeFaction = NONE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -353,7 +353,7 @@ void tmrCallback_InputGetter()
|
|||||||
{
|
{
|
||||||
if (PersistenceData.activeFaction != FACTION_1)
|
if (PersistenceData.activeFaction != FACTION_1)
|
||||||
{
|
{
|
||||||
Serial.println("Faction 1 captured !");
|
Debug_pushMessage("Faction 1 captured !");
|
||||||
globals.requestEEAction = EE_PDS_SAVE;
|
globals.requestEEAction = EE_PDS_SAVE;
|
||||||
}
|
}
|
||||||
PersistenceData.activeFaction = FACTION_1;
|
PersistenceData.activeFaction = FACTION_1;
|
||||||
@ -363,7 +363,7 @@ void tmrCallback_InputGetter()
|
|||||||
{
|
{
|
||||||
if (PersistenceData.activeFaction != FACTION_2)
|
if (PersistenceData.activeFaction != FACTION_2)
|
||||||
{
|
{
|
||||||
Serial.println("Faction 2 captured !");
|
Debug_pushMessage("Faction 2 captured !");
|
||||||
globals.requestEEAction = EE_PDS_SAVE;
|
globals.requestEEAction = EE_PDS_SAVE;
|
||||||
}
|
}
|
||||||
PersistenceData.activeFaction = FACTION_2;
|
PersistenceData.activeFaction = FACTION_2;
|
||||||
@ -373,7 +373,7 @@ void tmrCallback_InputGetter()
|
|||||||
{
|
{
|
||||||
if (PersistenceData.activeFaction != FACTION_3)
|
if (PersistenceData.activeFaction != FACTION_3)
|
||||||
{
|
{
|
||||||
Serial.println("Faction 3 captured !");
|
Debug_pushMessage("Faction 3 captured !");
|
||||||
globals.requestEEAction = EE_PDS_SAVE;
|
globals.requestEEAction = EE_PDS_SAVE;
|
||||||
}
|
}
|
||||||
PersistenceData.activeFaction = FACTION_3;
|
PersistenceData.activeFaction = FACTION_3;
|
||||||
@ -564,17 +564,17 @@ void ProcessKeyCombos(bool *btnState)
|
|||||||
if (btnState[0] != FAC_1_TRG_PRESSED && keyStatus_Fac1 == KEY_PRESSED)
|
if (btnState[0] != FAC_1_TRG_PRESSED && keyStatus_Fac1 == KEY_PRESSED)
|
||||||
{
|
{
|
||||||
if (keyCount_Fac2 > 0 || keyCount_Fac3 > 0)
|
if (keyCount_Fac2 > 0 || keyCount_Fac3 > 0)
|
||||||
Serial.printf("KeyCombo 2: %d | 3: %d\n", keyCount_Fac2, keyCount_Fac3);
|
Debug_pushMessage("KeyCombo 2: %d | 3: %d\n", keyCount_Fac2, keyCount_Fac3);
|
||||||
|
|
||||||
if (keyCount_Fac2 == 2 && keyCount_Fac3 == 0)
|
if (keyCount_Fac2 == 2 && keyCount_Fac3 == 0)
|
||||||
{
|
{
|
||||||
Serial.println("KeyCombo: WiFi AP ON");
|
Debug_pushMessage("KeyCombo: WiFi AP ON");
|
||||||
OverrideDisplay(5000, "NET ", " ", " ");
|
OverrideDisplay(5000, "NET ", " ", " ");
|
||||||
toggleWiFiAP(false);
|
toggleWiFiAP(false);
|
||||||
}
|
}
|
||||||
else if (keyCount_Fac2 == 4 && keyCount_Fac3 == 0)
|
else if (keyCount_Fac2 == 4 && keyCount_Fac3 == 0)
|
||||||
{
|
{
|
||||||
Serial.printf("KeyCombo: Reset Timer\n");
|
Debug_pushMessage("KeyCombo: Reset Timer\n");
|
||||||
if (globals.systemStatus == sysStat_Startup)
|
if (globals.systemStatus == sysStat_Startup)
|
||||||
{
|
{
|
||||||
OverrideDisplay(5000, "RST ", " ", " ");
|
OverrideDisplay(5000, "RST ", " ", " ");
|
||||||
@ -587,7 +587,7 @@ void ProcessKeyCombos(bool *btnState)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
OverrideDisplay(5000, "ERR ", " ", " ");
|
OverrideDisplay(5000, "ERR ", " ", " ");
|
||||||
Serial.printf("ERROR: only %d seconds after Startup!\n", STARTUP_DELAY_MS / 1000);
|
Debug_pushMessage("ERROR: only %d seconds after Startup!\n", STARTUP_DELAY_MS / 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,6 +407,9 @@ void WebserverEERestore_Callback(AsyncWebServerRequest *request, const String &f
|
|||||||
|
|
||||||
ConfigData.batteryType = (batteryType_t)doc["config"]["batteryType"].as<uint32_t>();
|
ConfigData.batteryType = (batteryType_t)doc["config"]["batteryType"].as<uint32_t>();
|
||||||
ConfigData.EEPROM_Version = doc["config"]["EEPROM_Version"].as<uint32_t>();
|
ConfigData.EEPROM_Version = doc["config"]["EEPROM_Version"].as<uint32_t>();
|
||||||
|
strncpy(ConfigData.Faction_1_Name, doc["config"]["Faction_1_Name"].as<String>().c_str(), sizeof(ConfigData.Faction_1_Name));
|
||||||
|
strncpy(ConfigData.Faction_2_Name, doc["config"]["Faction_2_Name"].as<String>().c_str(), sizeof(ConfigData.Faction_2_Name));
|
||||||
|
strncpy(ConfigData.Faction_3_Name, doc["config"]["Faction_3_Name"].as<String>().c_str(), sizeof(ConfigData.Faction_3_Name));
|
||||||
|
|
||||||
PersistenceData.writeCycleCounter = doc["persis"]["writeCycleCounter"].as<uint16_t>();
|
PersistenceData.writeCycleCounter = doc["persis"]["writeCycleCounter"].as<uint16_t>();
|
||||||
PersistenceData.activeFaction = (factions_t)doc["persis"]["activeFaction"].as<uint32_t>();
|
PersistenceData.activeFaction = (factions_t)doc["persis"]["activeFaction"].as<uint32_t>();
|
||||||
@ -456,6 +459,9 @@ void WebServerEEJSON_Callback(AsyncWebServerRequest *request)
|
|||||||
|
|
||||||
config["EEPROM_Version"] = ConfigData.EEPROM_Version;
|
config["EEPROM_Version"] = ConfigData.EEPROM_Version;
|
||||||
config["batteryType"] = ConfigData.batteryType;
|
config["batteryType"] = ConfigData.batteryType;
|
||||||
|
config["Faction_1_Name"] = ConfigData.Faction_1_Name;
|
||||||
|
config["Faction_2_Name"] = ConfigData.Faction_2_Name;
|
||||||
|
config["Faction_3_Name"] = ConfigData.Faction_3_Name;
|
||||||
sprintf(buffer, "0x%08X", ConfigData.checksum);
|
sprintf(buffer, "0x%08X", ConfigData.checksum);
|
||||||
config["checksum"] = buffer;
|
config["checksum"] = buffer;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user