Changes for Energy Speedometer connection

This commit is contained in:
Gunnar Skjold
2023-10-20 13:26:38 +02:00
parent f7cb022e3e
commit 1ceffd0bc9
16 changed files with 190 additions and 43 deletions

View File

@@ -33,7 +33,8 @@ struct SystemConfig {
bool userConfigured;
uint8_t dataCollectionConsent; // 0 = unknown, 1 = accepted, 2 = declined
char country[3];
}; // 7
bool energyspeedometer;
}; // 8
struct WiFiConfig {
char ssid[32];

View File

@@ -13,6 +13,7 @@ bool AmsConfiguration::getSystemConfig(SystemConfig& config) {
config.vendorConfigured = false;
config.userConfigured = false;
config.dataCollectionConsent = 0;
config.energyspeedometer = false;
strcpy(config.country, "");
return false;
}
@@ -85,7 +86,7 @@ void AmsConfiguration::clearWifi(WiFiConfig& config) {
uint16_t chipId;
#if defined(ESP32)
chipId = ESP.getEfuseMac();
chipId = ( ESP.getEfuseMac() >> 32 ) % 0xFFFFFFFF;
config.power = 195;
#else
chipId = ESP.getChipId();