mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +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)
|
bool readEEPROM(void)
|
||||||
{
|
{
|
||||||
suspendRxSignal();
|
suspendRxPwmPpmSignal();
|
||||||
|
|
||||||
// Sanity check, read flash
|
// Sanity check, read flash
|
||||||
bool success = loadEEPROM();
|
bool success = loadEEPROM();
|
||||||
|
@ -521,7 +521,7 @@ bool readEEPROM(void)
|
||||||
|
|
||||||
activateConfig();
|
activateConfig();
|
||||||
|
|
||||||
resumeRxSignal();
|
resumeRxPwmPpmSignal();
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
@ -530,11 +530,11 @@ void writeEEPROM(void)
|
||||||
{
|
{
|
||||||
validateAndFixConfig();
|
validateAndFixConfig();
|
||||||
|
|
||||||
suspendRxSignal();
|
suspendRxPwmPpmSignal();
|
||||||
|
|
||||||
writeConfigToEEPROM();
|
writeConfigToEEPROM();
|
||||||
|
|
||||||
resumeRxSignal();
|
resumeRxPwmPpmSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeEEPROMWithFeatures(uint32_t features)
|
void writeEEPROMWithFeatures(uint32_t features)
|
||||||
|
|
|
@ -322,26 +322,26 @@ bool rxAreFlightChannelsValid(void)
|
||||||
return rxFlightChannelsValid;
|
return rxFlightChannelsValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspendRxSignal(void)
|
void suspendRxPwmPpmSignal(void)
|
||||||
{
|
{
|
||||||
suspendRxSignalUntil = micros() + SKIP_RC_ON_SUSPEND_PERIOD;
|
|
||||||
#if defined(USE_PWM) || defined(USE_PPM)
|
#if defined(USE_PWM) || defined(USE_PPM)
|
||||||
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
||||||
|
suspendRxSignalUntil = micros() + SKIP_RC_ON_SUSPEND_PERIOD;
|
||||||
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
||||||
|
failsafeOnRxSuspend(SKIP_RC_ON_SUSPEND_PERIOD);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
failsafeOnRxSuspend(SKIP_RC_ON_SUSPEND_PERIOD);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void resumeRxSignal(void)
|
void resumeRxPwmPpmSignal(void)
|
||||||
{
|
{
|
||||||
suspendRxSignalUntil = micros();
|
|
||||||
#if defined(USE_PWM) || defined(USE_PPM)
|
#if defined(USE_PWM) || defined(USE_PPM)
|
||||||
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
if (featureIsEnabled(FEATURE_RX_PARALLEL_PWM | FEATURE_RX_PPM)) {
|
||||||
|
suspendRxSignalUntil = micros();
|
||||||
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
skipRxSamples = SKIP_RC_SAMPLES_ON_RESUME;
|
||||||
|
failsafeOnRxResume();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
failsafeOnRxResume();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
|
bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
|
||||||
|
|
|
@ -169,7 +169,7 @@ uint8_t getRssiPercent(void);
|
||||||
|
|
||||||
void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRangeConfig);
|
void resetAllRxChannelRangeConfigurations(rxChannelRangeConfig_t *rxChannelRangeConfig);
|
||||||
|
|
||||||
void suspendRxSignal(void);
|
void suspendRxPwmPpmSignal(void);
|
||||||
void resumeRxSignal(void);
|
void resumeRxPwmPpmSignal(void);
|
||||||
|
|
||||||
uint16_t rxGetRefreshRate(void);
|
uint16_t rxGetRefreshRate(void);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue