1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +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

@ -80,10 +80,12 @@ static long cmsx_Blackbox_FeatureRead(void)
static long cmsx_Blackbox_FeatureWriteback(void)
{
if (cmsx_FeatureBlackbox)
featureSet(FEATURE_BLACKBOX);
else
featureClear(FEATURE_BLACKBOX);
if (featureRead) {
if (cmsx_FeatureBlackbox)
featureSet(FEATURE_BLACKBOX);
else
featureClear(FEATURE_BLACKBOX);
}
return 0;
}