Browse Source

fix MI chashes

+ fix some lost debug messages
pull/1095/head
rejoe2 1 year ago
committed by GitHub
parent
commit
53f25629a6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 12
      src/hm/hmInverter.h
  4. 6
      src/hm/hmRadio.h
  5. 3
      src/hm/miPayload.h

4
src/CHANGES.md

@ -1,5 +1,9 @@
# Development Changes # Development Changes
## 0.7.34 - 2023-08-15
* fix MI chrashes
* fix some lost debug messages
## 0.7.33 - 2023-08-15 ## 0.7.33 - 2023-08-15
* add alarms overview to WebGui #608 * add alarms overview to WebGui #608
* fix webGui total values #1084 * fix webGui total values #1084

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 7 #define VERSION_MINOR 7
#define VERSION_PATCH 33 #define VERSION_PATCH 34
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

12
src/hm/hmInverter.h

@ -485,7 +485,9 @@ class Inverter {
rec->length = (uint8_t)(HMS1CH_LIST_LEN); rec->length = (uint8_t)(HMS1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms1chAssignment; rec->assign = (byteAssign_t *)hms1chAssignment;
rec->pyldLen = HMS1CH_PAYLOAD_LEN; rec->pyldLen = HMS1CH_PAYLOAD_LEN;
} } else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm1chAssignment;}
channels = 1; channels = 1;
} }
else if (INV_TYPE_2CH == type) { else if (INV_TYPE_2CH == type) {
@ -497,7 +499,9 @@ class Inverter {
rec->length = (uint8_t)(HMS2CH_LIST_LEN); rec->length = (uint8_t)(HMS2CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms2chAssignment; rec->assign = (byteAssign_t *)hms2chAssignment;
rec->pyldLen = HMS2CH_PAYLOAD_LEN; rec->pyldLen = HMS2CH_PAYLOAD_LEN;
} } else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm2chAssignment; }
channels = 2; channels = 2;
} }
else if (INV_TYPE_4CH == type) { else if (INV_TYPE_4CH == type) {
@ -509,7 +513,9 @@ class Inverter {
rec->length = (uint8_t)(HMS4CH_LIST_LEN); rec->length = (uint8_t)(HMS4CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms4chAssignment; rec->assign = (byteAssign_t *)hms4chAssignment;
rec->pyldLen = HMS4CH_PAYLOAD_LEN; rec->pyldLen = HMS4CH_PAYLOAD_LEN;
} } else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm4chAssignment; }
channels = 4; channels = 4;
} }
else if (INV_TYPE_6CH == type) { else if (INV_TYPE_6CH == type) {

6
src/hm/hmRadio.h

@ -278,9 +278,9 @@ class HmRadio {
void initPacket(uint64_t invId, uint8_t mid, uint8_t pid) { void initPacket(uint64_t invId, uint8_t mid, uint8_t pid) {
if(mSerialDebug) { if(mSerialDebug) {
DPRINT(DBG_VERBOSE, F("initPacket, mid: ")); DPRINT(DBG_VERBOSE, F("initPacket, mid: "));
DHEX(mid); DPRINT(DBG_VERBOSE, String(mid, HEX));
DBGPRINT(F(" pid: ")); DPRINT(DBG_VERBOSE,F(" pid: "));
DBGHEXLN(pid); DPRINTLN(DBG_VERBOSE,String(pid, HEX));
} }
memset(mTxBuf, 0, MAX_RF_PAYLOAD_SIZE); memset(mTxBuf, 0, MAX_RF_PAYLOAD_SIZE);
mTxBuf[0] = mid; // message id mTxBuf[0] = mid; // message id

3
src/hm/miPayload.h

@ -748,6 +748,9 @@ const byteAssign_t InfoAssignment[] = {
ac_pow = (int) (ac_pow*9.5); ac_pow = (int) (ac_pow*9.5);
iv->setValue(iv->getPosByChFld(0, FLD_PAC, rec), rec, (float) ac_pow/10); iv->setValue(iv->getPosByChFld(0, FLD_PAC, rec), rec, (float) ac_pow/10);
// update status state-machine,
iv->isProducing();
iv->doCalculations(); iv->doCalculations();
iv->setQueuedCmdFinished(); iv->setQueuedCmdFinished();
mStat->rxSuccess++; mStat->rxSuccess++;

Loading…
Cancel
Save