1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 21:35:44 +03:00

cosmetics

This commit is contained in:
tbs-fpv 2021-04-26 17:08:03 +08:00
parent 483b3cc5a7
commit e24d55f0a7
2 changed files with 15 additions and 17 deletions

View file

@ -497,8 +497,7 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeState_t *rxRuntimeState)
readByte >>= CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
readValue |= ((uint32_t) readByte) << bitsMerged;
bitsMerged += 8 - CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
}
else {
} else {
readValue |= ((uint32_t) readByte) << bitsMerged;
bitsMerged += 8;
}

View file

@ -86,8 +86,8 @@ typedef struct mspBuffer_s {
static mspBuffer_t mspRxBuffer;
bool isCrsfV3Running = false;
#if defined(USE_CRSF_V3)
static bool isCrsfV3Running = false;
typedef struct {
uint8_t hasPendingReply:1;
uint8_t isNewSpeedValid:1;
@ -735,8 +735,7 @@ void handleCrsfTelemetry(timeUs_t currentTimeUs)
crsfSpeed.confirmationTime = currentTimeUs;
crsfLastCycleTime = currentTimeUs;
return;
}
else if (crsfSpeed.isNewSpeedValid) {
} else if (crsfSpeed.isNewSpeedValid) {
if (currentTimeUs - crsfSpeed.confirmationTime >= 10000) {
// delay 10ms before applying the new baudrate
crsfRxUpdateBaudrate(getCrsfDesireSpeed());