mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Completely drop suspension for serial RX - there is no point since we do not use preemptive multitasking.
This commit is contained in:
parent
295550c921
commit
2ecfb1d183
3 changed files with 12 additions and 12 deletions
|
@ -512,7 +512,7 @@ void validateAndFixGyroConfig(void)
|
|||
|
||||
bool readEEPROM(void)
|
||||
{
|
||||
suspendRxSignal();
|
||||
suspendRxPwmPpmSignal();
|
||||
|
||||
// Sanity check, read flash
|
||||
bool success = loadEEPROM();
|
||||
|
@ -521,7 +521,7 @@ bool readEEPROM(void)
|
|||
|
||||
activateConfig();
|
||||
|
||||
resumeRxSignal();
|
||||
resumeRxPwmPpmSignal();
|
||||
|
||||
return success;
|
||||
}
|
||||
|
@ -530,11 +530,11 @@ void writeEEPROM(void)
|
|||
{
|
||||
validateAndFixConfig();
|
||||
|
||||
suspendRxSignal();
|
||||
suspendRxPwmPpmSignal();
|
||||
|
||||
writeConfigToEEPROM();
|
||||
|
||||
resumeRxSignal();
|
||||
resumeRxPwmPpmSignal();
|
||||
}
|
||||
|
||||
void writeEEPROMWithFeatures(uint32_t features)
|
||||
|
|
|
@ -322,26 +322,26 @@ bool rxAreFlightChannelsValid(void)
|
|||
return rxFlightChannelsValid;
|
||||
}
|
||||
|
||||
void suspendRxSignal(void)
|
||||
void suspendRxPwmPpmSignal(void)
|
||||
{
|
||||
suspendRxSignalUntil = micros() + SKIP_RC_ON_SUSPEND_PERIOD;
|
||||
#if defined(USE_PWM) || defined(USE_PPM)
|
||||
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
||||
suspendRxSignalUntil = micros() + SKIP_RC_ON_SUSPEND_PERIOD;
|
||||
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
||||
failsafeOnRxSuspend(SKIP_RC_ON_SUSPEND_PERIOD);
|
||||
}
|
||||
#endif
|
||||
failsafeOnRxSuspend(SKIP_RC_ON_SUSPEND_PERIOD);
|
||||
}
|
||||
|
||||
void resumeRxSignal(void)
|
||||
void resumeRxPwmPpmSignal(void)
|
||||
{
|
||||
suspendRxSignalUntil = micros();
|
||||
#if defined(USE_PWM) || defined(USE_PPM)
|
||||
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
||||
suspendRxSignalUntil = micros();
|
||||
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
||||
failsafeOnRxResume();
|
||||
}
|
||||
#endif
|
||||
failsafeOnRxResume();
|
||||
}
|
||||
|
||||
bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
|
||||
|
|
|
@ -169,7 +169,7 @@ uint8_t getRssiPercent(void);
|
|||
|
||||
void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRangeConfig);
|
||||
|
||||
void suspendRxSignal(void);
|
||||
void resumeRxSignal(void);
|
||||
void suspendRxPwmPpmSignal(void);
|
||||
void resumeRxPwmPpmSignal(void);
|
||||
|
||||
uint16_t rxGetRefreshRate(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue