diff --git a/src/CHANGES.md b/src/CHANGES.md index 2032f009..15dcfba2 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -2,6 +2,9 @@ ## 0.8.57 - 2024-01-15 * merge PR: fix immediate clearing of display after sunset #1364 +* merge PR: MI-MQTT and last retransmit #1363 +* fixed DTU-ID, now built from the unique part of the MAC +* fix lang in `/system` #1346 ## 0.8.56 - 2024-01-15 * potential fix of update problems and random reboots #1359 #1354 diff --git a/src/hm/CommQueue.h b/src/hm/CommQueue.h index d62efe07..13decc01 100644 --- a/src/hm/CommQueue.h +++ b/src/hm/CommQueue.h @@ -11,7 +11,6 @@ #include "hmInverter.h" #include "../utils/dbg.h" -// needs a '+1' because the comparison does not send if attempts is equal 0 #define DEFAULT_ATTEMPS 5 #define MORE_ATTEMPS_ALARMDATA 15 #define MORE_ATTEMPS_GRIDONPROFILEPARA 15 diff --git a/src/hm/Communication.h b/src/hm/Communication.h index 9e383b6a..7b5c84f9 100644 --- a/src/hm/Communication.h +++ b/src/hm/Communication.h @@ -144,14 +144,14 @@ class Communication : public CommQueue<> { } else { if(IV_MI == q->iv->ivGen) q->iv->mIvTxCnt++; - if(mFirstTry){ + if(mFirstTry) { mFirstTry = false; - mState = States::START; setAttempt(); mHeu.evalTxChQuality(q->iv, false, 0, 0); //q->iv->radioStatistics.rxFailNoAnser++; q->iv->radioStatistics.retransmits++; mWaitTime.stopTimeMonitor(); + mState = States::START; /*if(*mSerialDebug) { DPRINT_IVID(DBG_INFO, q->iv->id); diff --git a/src/hm/radio.h b/src/hm/radio.h index e5eda128..1422b285 100644 --- a/src/hm/radio.h +++ b/src/hm/radio.h @@ -103,16 +103,19 @@ class Radio { void generateDtuSn(void) { uint32_t chipID = 0; #ifdef ESP32 - uint64_t MAC = ESP.getEfuseMac(); - chipID = ((MAC >> 8) & 0xFF0000) | ((MAC >> 24) & 0xFF00) | ((MAC >> 40) & 0xFF); + chipID = (ESP.getEfuseMac() & 0xffffffff); #else chipID = ESP.getChipId(); #endif - mDtuSn = 0x80000000; // the first digit is an 8 for DTU production year 2022, the rest is filled with the ESP chipID in decimal - for(int i = 0; i < 7; i++) { - mDtuSn |= (chipID % 10) << (i * 4); - chipID /= 10; + + uint8_t t; + for(int i = 0; i < (7 << 2); i += 4) { + t = (chipID >> i) & 0x0f; + if(t > 0x09) + t -= 6; + mDtuSn |= (t << i); } + mDtuSn |= 0x80000000; // the first digit is an 8 for DTU production year 2022, the rest is filled with the ESP chipID in decimal } uint32_t mDtuSn; diff --git a/src/web/html/update.html b/src/web/html/update.html index 3fed75a5..800d9dfe 100644 --- a/src/web/html/update.html +++ b/src/web/html/update.html @@ -10,7 +10,7 @@
{#SELECT_FILE} (*.bin) -

{#INSTALLED_VERSION}:

+

{#INSTALLED_VERSION}:

diff --git a/src/web/lang.h b/src/web/lang.h index 3c3cd631..546399aa 100644 --- a/src/web/lang.h +++ b/src/web/lang.h @@ -73,15 +73,15 @@ #endif #ifdef LANG_DE - #define FACTORY_RESET "Ahoy Factory Reset" -#else /*LANG_EN*/ #define FACTORY_RESET "Ahoy auf Werkseinstellungen zurücksetzen" +#else /*LANG_EN*/ + #define FACTORY_RESET "Ahoy Factory Reset" #endif #ifdef LANG_DE - #define BTN_REBOOT "Reboot" -#else /*LANG_EN*/ #define BTN_REBOOT "Ahoy neustarten" +#else /*LANG_EN*/ + #define BTN_REBOOT "Reboot" #endif #endif /*__LANG_H__*/ diff --git a/src/web/lang.json b/src/web/lang.json index c910650e..ae8c0ca2 100644 --- a/src/web/lang.json +++ b/src/web/lang.json @@ -781,7 +781,7 @@ { "token": "IRQ_WORKING", "en": "Interrupt Pin working", - "de": "Interrupt Pin funktoniert" + "de": "Interrupt Pin funktioniert" }, { "token": "NRF24_DATA_RATE",