mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Merge pull request #2209 from jflyper/bfdev-fix-cms-autonomous-feature-resets
CMS: Don't write back uninitialized features on writeback
This commit is contained in:
commit
cb03adf009
3 changed files with 18 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -52,10 +52,12 @@ static long cmsx_Vtx_FeatureRead(void)
|
|||
|
||||
static long cmsx_Vtx_FeatureWriteback(void)
|
||||
{
|
||||
if (cmsx_featureVtx)
|
||||
featureSet(FEATURE_VTX);
|
||||
else
|
||||
featureClear(FEATURE_VTX);
|
||||
if (featureRead) {
|
||||
if (cmsx_featureVtx)
|
||||
featureSet(FEATURE_VTX);
|
||||
else
|
||||
featureClear(FEATURE_VTX);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue