Bsongis/xlite fixes (#5803)

X-Lite fixes
This commit is contained in:
Bertrand Songis
2018-04-04 23:40:21 +02:00
committed by GitHub
parent fabee0e675
commit ec463819fe
8 changed files with 50 additions and 39 deletions
+5 -3
View File
@@ -261,7 +261,7 @@ void generalDefault()
#endif
g_eeGeneral.slidersConfig = 0x0f; // 4 sliders
g_eeGeneral.blOffBright = 20;
#elif defined(PCBX7) || defined(PCBXLITE)
#elif defined(PCBX7) || defined(PCBXLITE)
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
@@ -269,7 +269,7 @@ void generalDefault()
#endif
#if defined(PCBXLITE)
g_eeGeneral.switchConfig = 0x0000000f; // 2x3POS
g_eeGeneral.switchConfig = (SWITCH_2POS << 6) + (SWITCH_2POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0); // 2x3POS, 2x2POS
#elif defined(PCBX7)
g_eeGeneral.switchConfig = 0x000006ff; // 4x3POS, 1x2POS, 1xTOGGLE
#elif defined(PCBTARANIS) || defined(PCBHORUS)
@@ -1268,7 +1268,7 @@ void alert(const pm_char * title, const pm_char * msg ALERT_SOUND_ARG)
bool refresh = false;
#endif
while(1) {
while (1) {
SIMU_SLEEP(1);
#if defined(CPUARM)
CoTickDelay(10);
@@ -1283,6 +1283,7 @@ void alert(const pm_char * title, const pm_char * msg ALERT_SOUND_ARG)
#if defined(PWR_BUTTON_PRESS)
uint32_t pwr_check = pwrCheck();
if (pwr_check == e_power_off) {
drawSleepBitmap();
boardOff();
}
else if (pwr_check == e_power_press) {
@@ -1294,6 +1295,7 @@ void alert(const pm_char * title, const pm_char * msg ALERT_SOUND_ARG)
}
#else
if (pwrCheck() == e_power_off) {
drawSleepBitmap();
boardOff(); // turn power off now
}
#endif