XLite support (#5806)

This commit is contained in:
Bertrand Songis
2018-04-25 23:07:04 +02:00
committed by GitHub
parent 37f96d452a
commit 99604dccc9
78 changed files with 1098 additions and 1050 deletions
+10 -21
View File
@@ -261,7 +261,9 @@ void generalDefault()
#endif
g_eeGeneral.slidersConfig = 0x0f; // 4 sliders
g_eeGeneral.blOffBright = 20;
#elif defined(PCBX7) || defined(PCBXLITE)
#elif defined(PCBXLITE)
g_eeGeneral.potsConfig = 0x0F; // S1 and S2 = pot without detent
#elif defined(PCBX7)
g_eeGeneral.potsConfig = 0x07; // S1 = pot without detent, S2 = pot with detent
#elif defined(PCBTARANIS)
g_eeGeneral.potsConfig = 0x05; // S1 and S2 = pots with detent
@@ -276,25 +278,12 @@ void generalDefault()
g_eeGeneral.switchConfig = 0x00007bff; // 6x3POS, 1x2POS, 1xTOGGLE
#endif
// vBatWarn is voltage in 100mV, vBatMin is in 100mV but with -9V offset, vBatMax has a -12V offset
#if defined(PCBX9E) || defined(PCBX12S)
// NI-MH 9.6V
g_eeGeneral.vBatWarn = 87;
g_eeGeneral.vBatMin = -5; //8,5V
g_eeGeneral.vBatMax = -5; //11,5V
#elif defined(PCBX10)
// Lipo 2V
g_eeGeneral.vBatWarn = 66;
g_eeGeneral.vBatMin = -28; // 6.2V
g_eeGeneral.vBatMax = -38; // 8.2V
#elif defined(PCBTARANIS)
// NI-MH 7.2V, X9D, X9D+ and X7
g_eeGeneral.vBatWarn = 65;
g_eeGeneral.vBatMin = -30; //6V
g_eeGeneral.vBatMax = -40; //8V
#else
g_eeGeneral.vBatWarn = 90;
#endif
// vBatWarn is voltage in 100mV, vBatMin is in 100mV but with -9V offset, vBatMax has a -12V offset
g_eeGeneral.vBatWarn = BATTERY_WARN;
if (BATTERY_MIN != 90)
g_eeGeneral.vBatMin = BATTERY_MIN - 90;
if (BATTERY_MAX != 120)
g_eeGeneral.vBatMax = BATTERY_MAX - 120;
#if defined(DEFAULT_MODE)
g_eeGeneral.stickMode = DEFAULT_MODE-1;
@@ -2860,7 +2849,7 @@ uint32_t pwrCheck()
event_t evt = getEvent(false);
DISPLAY_WARNING(evt);
lcdRefresh();
if (warningResult) {
pwr_check_state = PWR_CHECK_OFF;
return e_power_off;