* complete payload processed (and crc checked)

* inverter type is defined by serial number
* serial debug can be switched live (using setup)
-> Note: only one inverter is supported for now!
This commit is contained in:
lumapu 2022-05-17 15:30:36 +02:00
parent 2dcf948d60
commit 724f0ab83a
10 changed files with 261 additions and 209 deletions

View file

@ -11,8 +11,8 @@ uint8_t crc8(uint8_t buf[], uint8_t len) {
return crc;
}
uint16_t crc16(uint8_t buf[], uint8_t len) {
uint16_t crc = 0xffff;
uint16_t crc16(uint8_t buf[], uint8_t len, uint16_t start) {
uint16_t crc = start;
uint8_t shift = 0;
for(uint8_t i = 0; i < len; i ++) {