E010r5: added flip, led and calib channels

This commit is contained in:
Pascal Langer
2021-01-11 12:12:26 +01:00
parent 062fc05eac
commit 49f004e53f
10 changed files with 83 additions and 78 deletions

View File

@@ -58,11 +58,12 @@ static void __attribute__((unused)) ssv_pack_dpl(uint8_t addr[], uint8_t pid, ui
uint16_t val;
} crc;
crc.val=0x3c18;
crc=0x3c18;
for (i = 0; i < 7; ++i)
crc.val=crc16_update(crc.val,header[i],8);
crc16_update(header[i],8);
for (i = 0; i < *len; ++i)
crc.val=crc16_update(crc.val,payload[i],8);
crc16_update(payload[i],8);
crc.val=crc;
// encode payload and crc
// xor with this: