remove trailing spaces
This commit is contained in:
parent
cbf9d355cd
commit
eb16326897
|
@ -413,7 +413,7 @@ STATIC_UNIT_TESTED void crsfDataReceive(uint16_t c, void *data)
|
||||||
#endif
|
#endif
|
||||||
#if defined(USE_CRSF_V3)
|
#if defined(USE_CRSF_V3)
|
||||||
case CRSF_FRAMETYPE_COMMAND:
|
case CRSF_FRAMETYPE_COMMAND:
|
||||||
if ((crsfFrame.bytes[fullFrameLength - 2] == crsfFrameCmdCRC()) &&
|
if ((crsfFrame.bytes[fullFrameLength - 2] == crsfFrameCmdCRC()) &&
|
||||||
(crsfFrame.bytes[3] == CRSF_ADDRESS_FLIGHT_CONTROLLER)) {
|
(crsfFrame.bytes[3] == CRSF_ADDRESS_FLIGHT_CONTROLLER)) {
|
||||||
crsfProcessCommand(crsfFrame.frame.payload + CRSF_FRAME_ORIGIN_DEST_SIZE);
|
crsfProcessCommand(crsfFrame.frame.payload + CRSF_FRAME_ORIGIN_DEST_SIZE);
|
||||||
}
|
}
|
||||||
|
@ -507,8 +507,8 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeState_t *rxRuntimeState)
|
||||||
readValue >>= CRSF_SUBSET_RC_CHANNELS_PACKED_RESOLUTION;
|
readValue >>= CRSF_SUBSET_RC_CHANNELS_PACKED_RESOLUTION;
|
||||||
bitsMerged -= CRSF_SUBSET_RC_CHANNELS_PACKED_RESOLUTION;
|
bitsMerged -= CRSF_SUBSET_RC_CHANNELS_PACKED_RESOLUTION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return RX_FRAME_COMPLETE;
|
return RX_FRAME_COMPLETE;
|
||||||
}
|
}
|
||||||
return RX_FRAME_PENDING;
|
return RX_FRAME_PENDING;
|
||||||
|
|
|
@ -379,7 +379,7 @@ void crsfFrameSpeedNegotiationResponse(sbuf_t *dst, bool reply) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void crsfProcessSpeedNegotiationCmd(uint8_t *frameStart) {
|
static void crsfProcessSpeedNegotiationCmd(uint8_t *frameStart) {
|
||||||
|
|
||||||
uint32_t newBaudrate = frameStart[2] << 24 | frameStart[3] << 16 | frameStart[4] << 8 | frameStart[5];
|
uint32_t newBaudrate = frameStart[2] << 24 | frameStart[3] << 16 | frameStart[4] << 8 | frameStart[5];
|
||||||
uint8_t ii = 0;
|
uint8_t ii = 0;
|
||||||
for (ii = 0; ii < BAUD_COUNT; ++ii) {
|
for (ii = 0; ii < BAUD_COUNT; ++ii) {
|
||||||
|
@ -393,7 +393,7 @@ static void crsfProcessSpeedNegotiationCmd(uint8_t *frameStart) {
|
||||||
|
|
||||||
void crsfScheduleSpeedNegotiationResponse(void) {
|
void crsfScheduleSpeedNegotiationResponse(void) {
|
||||||
crsfSpeed.hasPendingReply = true;
|
crsfSpeed.hasPendingReply = true;
|
||||||
crsfSpeed.isNewSpeedValid = false;
|
crsfSpeed.isNewSpeedValid = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -731,7 +731,7 @@ void handleCrsfTelemetry(timeUs_t currentTimeUs)
|
||||||
crsfFrameSpeedNegotiationResponse(dst, found);
|
crsfFrameSpeedNegotiationResponse(dst, found);
|
||||||
crsfFinalize(dst);
|
crsfFinalize(dst);
|
||||||
crsfSpeed.hasPendingReply = false;
|
crsfSpeed.hasPendingReply = false;
|
||||||
crsfSpeed.isNewSpeedValid = true;
|
crsfSpeed.isNewSpeedValid = true;
|
||||||
crsfSpeed.confirmationTime = currentTimeUs;
|
crsfSpeed.confirmationTime = currentTimeUs;
|
||||||
crsfLastCycleTime = currentTimeUs;
|
crsfLastCycleTime = currentTimeUs;
|
||||||
return;
|
return;
|
||||||
|
@ -741,7 +741,7 @@ void handleCrsfTelemetry(timeUs_t currentTimeUs)
|
||||||
// delay 10ms before applying the new baudrate
|
// delay 10ms before applying the new baudrate
|
||||||
crsfRxUpdateBaudrate(getCrsfDesireSpeed());
|
crsfRxUpdateBaudrate(getCrsfDesireSpeed());
|
||||||
crsfSpeed.isNewSpeedValid = false;
|
crsfSpeed.isNewSpeedValid = false;
|
||||||
isCrsfV3Running = true;
|
isCrsfV3Running = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue