bugfix pointer for pwr limit data

This commit is contained in:
Andreas Schiffler 2022-08-07 18:42:21 +02:00
parent 028aedb788
commit 03bb7fbb88
2 changed files with 6 additions and 5 deletions

View file

@ -176,12 +176,13 @@ class HmRadio {
if (data[0] == 0xffff){
data[0] &= 0xffff; // ToDo: unlimit value is needed and is inverter specific! --> get it via RF from inverter or via user interface
} else {
data[0] *= 10;
data[0] *= 10; // will overwrite the data bc it is a pointer
}
mTxBuf[10 + (++cnt)] = (data[0] >> 8) & 0xff; // power limit
mTxBuf[10 + (++cnt)] = (data[0] ) & 0xff; // power limit
mTxBuf[10 + (++cnt)] = (data[1] >> 8) & 0xff; // setting for persistens handling
mTxBuf[10 + (++cnt)] = (data[1] ) & 0xff; // setting for persistens handling
data[0] /= 10; // UGLY!
}
// crc control data
uint16_t crc = crc16(&mTxBuf[10], cnt+1);