From 53f25629a6ab5e7bc58b4b4b438984f3dc65c5b6 Mon Sep 17 00:00:00 2001 From: rejoe2 Date: Tue, 15 Aug 2023 11:53:09 +0200 Subject: [PATCH] fix MI chashes + fix some lost debug messages --- src/CHANGES.md | 4 ++++ src/defines.h | 2 +- src/hm/hmInverter.h | 12 +++++++++--- src/hm/hmRadio.h | 6 +++--- src/hm/miPayload.h | 3 +++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index 17cb5243..c600ab8e 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.7.34 - 2023-08-15 +* fix MI chrashes +* fix some lost debug messages + ## 0.7.33 - 2023-08-15 * add alarms overview to WebGui #608 * fix webGui total values #1084 diff --git a/src/defines.h b/src/defines.h index c9af1643..9d3f6247 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 7 -#define VERSION_PATCH 33 +#define VERSION_PATCH 34 //------------------------------------- typedef struct { diff --git a/src/hm/hmInverter.h b/src/hm/hmInverter.h index 59f3f503..ae8b0143 100644 --- a/src/hm/hmInverter.h +++ b/src/hm/hmInverter.h @@ -485,7 +485,9 @@ class Inverter { rec->length = (uint8_t)(HMS1CH_LIST_LEN); rec->assign = (byteAssign_t *)hms1chAssignment; rec->pyldLen = HMS1CH_PAYLOAD_LEN; - } + } else if(IV_MI == ivGen) { + rec->length = (uint8_t)(HM1CH_LIST_LEN); + rec->assign = (byteAssign_t *)hm1chAssignment;} channels = 1; } else if (INV_TYPE_2CH == type) { @@ -497,7 +499,9 @@ class Inverter { rec->length = (uint8_t)(HMS2CH_LIST_LEN); rec->assign = (byteAssign_t *)hms2chAssignment; rec->pyldLen = HMS2CH_PAYLOAD_LEN; - } + } else if(IV_MI == ivGen) { + rec->length = (uint8_t)(HM1CH_LIST_LEN); + rec->assign = (byteAssign_t *)hm2chAssignment; } channels = 2; } else if (INV_TYPE_4CH == type) { @@ -509,7 +513,9 @@ class Inverter { rec->length = (uint8_t)(HMS4CH_LIST_LEN); rec->assign = (byteAssign_t *)hms4chAssignment; rec->pyldLen = HMS4CH_PAYLOAD_LEN; - } + } else if(IV_MI == ivGen) { + rec->length = (uint8_t)(HM1CH_LIST_LEN); + rec->assign = (byteAssign_t *)hm4chAssignment; } channels = 4; } else if (INV_TYPE_6CH == type) { diff --git a/src/hm/hmRadio.h b/src/hm/hmRadio.h index 9be396d2..07bb8c00 100644 --- a/src/hm/hmRadio.h +++ b/src/hm/hmRadio.h @@ -278,9 +278,9 @@ class HmRadio { void initPacket(uint64_t invId, uint8_t mid, uint8_t pid) { if(mSerialDebug) { DPRINT(DBG_VERBOSE, F("initPacket, mid: ")); - DHEX(mid); - DBGPRINT(F(" pid: ")); - DBGHEXLN(pid); + DPRINT(DBG_VERBOSE, String(mid, HEX)); + DPRINT(DBG_VERBOSE,F(" pid: ")); + DPRINTLN(DBG_VERBOSE,String(pid, HEX)); } memset(mTxBuf, 0, MAX_RF_PAYLOAD_SIZE); mTxBuf[0] = mid; // message id diff --git a/src/hm/miPayload.h b/src/hm/miPayload.h index 516c7c9a..f617a1bf 100644 --- a/src/hm/miPayload.h +++ b/src/hm/miPayload.h @@ -748,6 +748,9 @@ const byteAssign_t InfoAssignment[] = { ac_pow = (int) (ac_pow*9.5); iv->setValue(iv->getPosByChFld(0, FLD_PAC, rec), rec, (float) ac_pow/10); + // update status state-machine, + iv->isProducing(); + iv->doCalculations(); iv->setQueuedCmdFinished(); mStat->rxSuccess++;