1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 12:25:12 +03:00

[Horus] Pots / Sliders default config was wrong. Is it better?

This commit is contained in:
Bertrand Songis 2016-08-31 19:48:17 +02:00
parent f97eda2b4f
commit 4e576efdd7
3 changed files with 8 additions and 4 deletions

View file

@ -876,8 +876,8 @@ PACK(struct TrainerData {
#if defined(PCBHORUS)
#define EXTRA_GENERAL_FIELDS \
EXTRA_GENERAL_FIELDS_ARM \
NOBACKUP(uint8_t serial2Mode:6); \
uint8_t slidersConfig:2; \
NOBACKUP(uint8_t serial2Mode:4); \
uint8_t slidersConfig:4; \
uint32_t switchConfig; \
uint8_t potsConfig; /* two bits per pot */ \
NOBACKUP(char switchNames[NUM_SWITCHES][LEN_SWITCH_NAME]); \

View file

@ -83,6 +83,7 @@ bool menuRadioHardware(event_t event)
case ITEM_RADIO_HARDWARE_LABEL_STICKS:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_STICKS);
break;
case ITEM_RADIO_HARDWARE_STICK1:
case ITEM_RADIO_HARDWARE_STICK2:
case ITEM_RADIO_HARDWARE_STICK3:
@ -96,6 +97,7 @@ bool menuRadioHardware(event_t event)
lcdDrawTextAtIndex(HW_SETTINGS_COLUMN, y, STR_MMMINV, 0, 0);
break;
}
case ITEM_RADIO_HARDWARE_LS:
case ITEM_RADIO_HARDWARE_RS:
case ITEM_RADIO_HARDWARE_LS2:
@ -114,9 +116,11 @@ bool menuRadioHardware(event_t event)
g_eeGeneral.slidersConfig |= (potType << idx);
break;
}
case ITEM_RADIO_HARDWARE_LABEL_POTS:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_POTS);
break;
case ITEM_RADIO_HARDWARE_POT1:
case ITEM_RADIO_HARDWARE_POT2:
case ITEM_RADIO_HARDWARE_POT3:

View file

@ -239,8 +239,8 @@ void generalDefault()
g_eeGeneral.vBatMin = -60; // 0 is 9.0V
g_eeGeneral.vBatMax = -78; // 0 is 12.0V
#elif defined(PCBHORUS)
g_eeGeneral.potsConfig = 0x05; // S1 and S2 = pots with detent
g_eeGeneral.slidersConfig = 0x03; // LS and RS = sliders with detent
g_eeGeneral.potsConfig = 0x19; // S1 and S2 = pots with detent
g_eeGeneral.slidersConfig = 0x0f; // 4 sliders
g_eeGeneral.blOffBright = 20;
#elif defined(PCBTARANIS)
g_eeGeneral.potsConfig = 0x05; // S1 and S2 = pots with detent