1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Checksum range changed from 1

This commit is contained in:
jflyper 2017-01-12 03:47:28 +09:00 committed by Raphael Coeffic
parent 74d175edfb
commit 0c026a237a

View file

@ -44,12 +44,12 @@ static void trampWriteBuf(uint8_t *buf)
serialWriteBuf(trampSerialPort, buf, 16);
}
static uint8_t trampChecksum(uint8_t *buf)
static uint8_t trampChecksum(uint8_t *trampBuf)
{
uint8_t cksum = 0;
for (int i = 0 ; i < 14 ; i++)
cksum += buf[i];
for (int i = 1 ; i < 14 ; i++)
cksum += trampBuf[i];
return cksum;
}