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

Don't write back uninitialized features on onGlobalExit

This commit is contained in:
jflyper 2017-01-25 11:49:32 +09:00
parent 109b9b2ca1
commit 753afe0562
3 changed files with 18 additions and 12 deletions

View file

@ -53,10 +53,12 @@ static long cmsx_Ledstrip_FeatureRead(void)
static long cmsx_Ledstrip_FeatureWriteback(void)
{
if (cmsx_FeatureLedstrip)
featureSet(FEATURE_LED_STRIP);
else
featureClear(FEATURE_LED_STRIP);
if (featureRead) {
if (cmsx_FeatureLedstrip)
featureSet(FEATURE_LED_STRIP);
else
featureClear(FEATURE_LED_STRIP);
}
return 0;
}