mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-10 15:36:38 +02:00
bugfix pointer for pwr limit data
This commit is contained in:
parent
028aedb788
commit
03bb7fbb88
2 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue