mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
cosmetics
This commit is contained in:
parent
483b3cc5a7
commit
e24d55f0a7
2 changed files with 15 additions and 17 deletions
|
@ -497,8 +497,7 @@ STATIC_UNIT_TESTED uint8_t crsfFrameStatus(rxRuntimeState_t *rxRuntimeState)
|
||||||
readByte >>= CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
|
readByte >>= CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
|
||||||
readValue |= ((uint32_t) readByte) << bitsMerged;
|
readValue |= ((uint32_t) readByte) << bitsMerged;
|
||||||
bitsMerged += 8 - CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
|
bitsMerged += 8 - CRSF_SUBSET_RC_CHANNELS_PACKED_STARTING_CHANNEL_RESOLUTION;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
readValue |= ((uint32_t) readByte) << bitsMerged;
|
readValue |= ((uint32_t) readByte) << bitsMerged;
|
||||||
bitsMerged += 8;
|
bitsMerged += 8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,8 +86,8 @@ typedef struct mspBuffer_s {
|
||||||
|
|
||||||
static mspBuffer_t mspRxBuffer;
|
static mspBuffer_t mspRxBuffer;
|
||||||
|
|
||||||
bool isCrsfV3Running = false;
|
|
||||||
#if defined(USE_CRSF_V3)
|
#if defined(USE_CRSF_V3)
|
||||||
|
static bool isCrsfV3Running = false;
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t hasPendingReply:1;
|
uint8_t hasPendingReply:1;
|
||||||
uint8_t isNewSpeedValid:1;
|
uint8_t isNewSpeedValid:1;
|
||||||
|
@ -735,8 +735,7 @@ void handleCrsfTelemetry(timeUs_t currentTimeUs)
|
||||||
crsfSpeed.confirmationTime = currentTimeUs;
|
crsfSpeed.confirmationTime = currentTimeUs;
|
||||||
crsfLastCycleTime = currentTimeUs;
|
crsfLastCycleTime = currentTimeUs;
|
||||||
return;
|
return;
|
||||||
}
|
} else if (crsfSpeed.isNewSpeedValid) {
|
||||||
else if (crsfSpeed.isNewSpeedValid) {
|
|
||||||
if (currentTimeUs - crsfSpeed.confirmationTime >= 10000) {
|
if (currentTimeUs - crsfSpeed.confirmationTime >= 10000) {
|
||||||
// delay 10ms before applying the new baudrate
|
// delay 10ms before applying the new baudrate
|
||||||
crsfRxUpdateBaudrate(getCrsfDesireSpeed());
|
crsfRxUpdateBaudrate(getCrsfDesireSpeed());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue