Crossfire CRC added

This commit is contained in:
Bertrand Songis
2016-03-28 20:31:42 +02:00
parent a3c175f537
commit f2fb6b20de
4 changed files with 65 additions and 9 deletions
+7
View File
@@ -35,5 +35,12 @@ TEST(Crossfire, createCrossfireFrame)
// TODO check
}
TEST(Crossfire, crc8)
{
uint8_t frame[] = { 0x00, 0x0C, 0x14, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x01, 0x03, 0x00, 0x00, 0x00, 0xF4 };
uint8_t crc = crc8(&frame[2], frame[1]-1);
ASSERT_EQ(frame[frame[1]+1], crc);
}
#endif