fix: Companion will set critical radio general settings to profile defaults if mismatched boards (#1575)
* Do not import potentially conflicting radio settings * Revert "Do not import potentially conflicting radio settings" This reverts commit 06a19c04d6de341568362b87311264081aa3d38f. * Override critical general settings to defaults when board mismatch
This commit is contained in:
@@ -70,12 +70,14 @@ bool GeneralSettings::isSliderAvailable(int index) const
|
||||
return sliderConfig[index] != Board::SLIDER_NONE;
|
||||
}
|
||||
|
||||
GeneralSettings::GeneralSettings()
|
||||
void GeneralSettings::clear()
|
||||
{
|
||||
memset(reinterpret_cast<void *>(this), 0, sizeof(GeneralSettings));
|
||||
init();
|
||||
}
|
||||
|
||||
contrast = 25;
|
||||
|
||||
void GeneralSettings::init()
|
||||
{
|
||||
for (int i = 0; i < CPN_MAX_ANALOGS; ++i) {
|
||||
calibMid[i] = 0x200;
|
||||
calibSpanNeg[i] = 0x180;
|
||||
@@ -247,8 +249,6 @@ GeneralSettings::GeneralSettings()
|
||||
|
||||
internalModule = g.profile[g.sessionId()].defaultInternalModule();
|
||||
|
||||
const char * themeName = IS_FLYSKY_NV14(board) ? "FlySky" : "EdgeTX";
|
||||
RadioTheme::init(themeName, themeData);
|
||||
}
|
||||
|
||||
void GeneralSettings::setDefaultControlTypes(Board::Type board)
|
||||
|
||||
Reference in New Issue
Block a user