mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-16 09:31:39 +02:00
first changes to prepare code for esp32
This commit is contained in:
parent
6ac3876092
commit
1200ca0b79
6 changed files with 26 additions and 11 deletions
tools/esp8266
|
@ -318,12 +318,12 @@ bool app::buildPayload(uint8_t id) {
|
|||
for(uint8_t i = 0; i < mPayload[id].maxPackId; i ++) {
|
||||
if(mPayload[id].len[i] > 0) {
|
||||
if(i == (mPayload[id].maxPackId-1)) {
|
||||
crc = crc16(mPayload[id].data[i], mPayload[id].len[i] - 2, crc);
|
||||
crc = Hoymiles::crc16(mPayload[id].data[i], mPayload[id].len[i] - 2, crc);
|
||||
crcRcv = (mPayload[id].data[i][mPayload[id].len[i] - 2] << 8)
|
||||
| (mPayload[id].data[i][mPayload[id].len[i] - 1]);
|
||||
}
|
||||
else
|
||||
crc = crc16(mPayload[id].data[i], mPayload[id].len[i], crc);
|
||||
crc = Hoymiles::crc16(mPayload[id].data[i], mPayload[id].len[i], crc);
|
||||
}
|
||||
yield();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue