fix unit test build errors
This commit is contained in:
parent
ee2179b836
commit
daf6043429
|
@ -412,12 +412,14 @@ STATIC_UNIT_TESTED void crsfDataReceive(uint16_t c, void *data)
|
|||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(USE_CRSF_V3)
|
||||
case CRSF_FRAMETYPE_COMMAND:
|
||||
if ((crsfFrame.bytes[fullFrameLength - 2] == crsfFrameCmdCRC()) &&
|
||||
(crsfFrame.bytes[3] == CRSF_ADDRESS_FLIGHT_CONTROLLER)) {
|
||||
crsfProcessCommand(crsfFrame.frame.payload + CRSF_FRAME_ORIGIN_DEST_SIZE);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -629,6 +629,7 @@ void crsfProcessDisplayPortCmd(uint8_t *frameStart)
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(USE_CRSF_V3)
|
||||
void crsfProcessCommand(uint8_t *frameStart) {
|
||||
uint8_t cmd = *frameStart;
|
||||
uint8_t subCmd = frameStart[1];
|
||||
|
@ -649,6 +650,7 @@ void crsfProcessCommand(uint8_t *frameStart) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Called periodically by the scheduler
|
||||
|
|
|
@ -239,10 +239,10 @@ TEST(CrossFireTest, TestCapturedData)
|
|||
EXPECT_EQ(983, crsfChannelData[3]);
|
||||
uint8_t crc = crsfFrameCRC();
|
||||
EXPECT_EQ(crc, crsfFrame.frame.payload[CRSF_FRAME_RC_CHANNELS_PAYLOAD_SIZE]);
|
||||
EXPECT_EQ(999, crsfReadRawRC(NULL, 0));
|
||||
EXPECT_EQ(1501, crsfReadRawRC(NULL, 1));
|
||||
EXPECT_EQ(1492, crsfReadRawRC(NULL, 2));
|
||||
EXPECT_EQ(1495, crsfReadRawRC(NULL, 3));
|
||||
EXPECT_EQ(998, crsfReadRawRC(NULL, 0));
|
||||
EXPECT_EQ(1500, crsfReadRawRC(NULL, 1));
|
||||
EXPECT_EQ(1491, crsfReadRawRC(NULL, 2));
|
||||
EXPECT_EQ(1494, crsfReadRawRC(NULL, 3));
|
||||
|
||||
++framePtr;
|
||||
crsfFrame = *(const crsfFrame_t*)framePtr;
|
||||
|
|
Loading…
Reference in New Issue