Issue #192 - Trims and Rotary encoders buttons added to the switches

list
This commit is contained in:
Bertrand Songis
2014-02-06 12:45:53 +01:00
parent 46fe25fd24
commit 4a20329b2b
14 changed files with 178 additions and 108 deletions
+7 -4
View File
@@ -196,15 +196,18 @@ void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
#if defined(PCBTARANIS)
int ConvertSwitch_215_to_216(int swtch)
{
if (swtch < SWSRC_ON)
if (swtch <= SWSRC_LAST_SWITCH)
return swtch;
else
return swtch + (2*6); // 2 * 6-pos pots added as switches
return swtch + 4 + (2*6); // 4 trims and 2 * 6-pos added as switches
}
#else
inline int ConvertSwitch_215_to_216(int swtch)
{
return swtch;
if (swtch <= SWSRC_LAST_SWITCH)
return swtch;
else
return swtch + 4 + 1; // 4 trims and REa added
}
#endif
@@ -219,7 +222,7 @@ void ConvertModel_215_to_216(ModelData &model)
// Custom Switches: better precision for x when A comes from telemetry
// Main View: altitude in top bar
// Mixes: GVARS in weight moved from 512 to 4096 and -512 to -4096, because GVARS may be used in limits [-1250:1250]
// Switches: two 6-pos pots added
// Switches: two 6-pos pots added, REa added to Sky9x
TRACE("Model conversion from v215 to v216");