mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 21:05:26 +03:00
[X9D] Different fix
This commit is contained in:
parent
f78dbafa17
commit
a08c391f93
6 changed files with 7 additions and 20 deletions
|
@ -632,13 +632,8 @@ enum MixSources {
|
|||
#elif defined(PCBTARANIS)
|
||||
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
|
||||
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
|
||||
#if defined(PCBX9D)
|
||||
MIXSRC_POT3 = MIXSRC_NONE,
|
||||
MIXSRC_FIRST_SLIDER = MIXSRC_POT2 + 1,
|
||||
#else
|
||||
MIXSRC_POT3, LUA_EXPORT("s3", "Potentiometer 3")
|
||||
MIXSRC_FIRST_SLIDER,
|
||||
#endif
|
||||
MIXSRC_SLIDER1 = MIXSRC_FIRST_SLIDER, LUA_EXPORT("ls", "Left slider")
|
||||
MIXSRC_SLIDER2, LUA_EXPORT("rs", "Right slider")
|
||||
MIXSRC_LAST_POT = MIXSRC_SLIDER2,
|
||||
|
|
|
@ -172,10 +172,8 @@ void drawSliders()
|
|||
coord_t x = ((i==SLIDER1 || i==SLIDER3) ? 3 : LCD_W-5);
|
||||
int8_t y = (i<SLIDER3 ? LCD_H/2+1 : 1);
|
||||
#else
|
||||
#if defined(HARDWARE_POT3)
|
||||
if (i == POT3)
|
||||
continue;
|
||||
#endif
|
||||
coord_t x = ((i==POT1 || i==SLIDER1) ? 3 : LCD_W-5);
|
||||
int8_t y = (i>=SLIDER1 ? LCD_H/2+1 : 1);
|
||||
#endif
|
||||
|
|
|
@ -99,7 +99,7 @@ enum {
|
|||
#if defined(HARDWARE_POT2)
|
||||
ITEM_RADIO_HARDWARE_POT2,
|
||||
#endif
|
||||
#if defined(HARDWARE_POT3)
|
||||
#if defined(HARDWARE_POT3) || defined(PCBX9D) // TODO #if defined(STORAGE_POT3)
|
||||
ITEM_RADIO_HARDWARE_POT3,
|
||||
#endif
|
||||
#if defined(HARDWARE_POT4)
|
||||
|
@ -194,6 +194,8 @@ enum {
|
|||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif (NUM_POTS + NUM_SLIDERS) == 3
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif defined(PCBX9D) // TODO defined(STORAGE_POT3) && !defined(STORAGE_POT3)
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, HIDDEN_ROW, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif (NUM_POTS + NUM_SLIDERS) == 4
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif (NUM_POTS + NUM_SLIDERS) == 5
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#elif defined(PCBX9DP)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,-1, 1,1, 1, 1};
|
||||
#elif defined(PCBX9D)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1, 1,1, 1, 1};
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,0, 1,1, 1, 1};
|
||||
#elif defined(PCBX7)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, 1,1, 1, 1};
|
||||
#elif defined(PCBX9LITE)
|
||||
|
|
|
@ -465,11 +465,6 @@ enum Analogs {
|
|||
SLIDER2,
|
||||
SLIDER3,
|
||||
SLIDER4,
|
||||
#elif defined(PCBX9D)
|
||||
POT2,
|
||||
POT_LAST = POT2,
|
||||
SLIDER1,
|
||||
SLIDER2,
|
||||
#else
|
||||
POT2,
|
||||
POT3,
|
||||
|
@ -503,7 +498,7 @@ enum Analogs {
|
|||
#define STORAGE_NUM_POTS 3
|
||||
#define STORAGE_NUM_SLIDERS 2
|
||||
#else
|
||||
#define NUM_POTS 2
|
||||
#define NUM_POTS 3 // TODO X9D has only 2 pots
|
||||
#define NUM_SLIDERS 2
|
||||
#define STORAGE_NUM_POTS 3
|
||||
#define STORAGE_NUM_SLIDERS 2
|
||||
|
@ -561,7 +556,7 @@ enum CalibratedAnalogs {
|
|||
CALIBRATED_STICK3,
|
||||
CALIBRATED_STICK4,
|
||||
CALIBRATED_POT_FIRST,
|
||||
CALIBRATED_POT_LAST = CALIBRATED_POT_FIRST + STORAGE_NUM_POTS - 1,
|
||||
CALIBRATED_POT_LAST = CALIBRATED_POT_FIRST + NUM_POTS - 1,
|
||||
CALIBRATED_SLIDER_FIRST,
|
||||
CALIBRATED_SLIDER_LAST = CALIBRATED_SLIDER_FIRST + NUM_SLIDERS - 1,
|
||||
NUM_CALIBRATED_ANALOGS
|
||||
|
|
|
@ -50,9 +50,6 @@
|
|||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBX9D)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\311LS\0""\311RS\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0""\312SG\0""\312SH\0""\312SI\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0""\310S3\0""\311LS\0""\311RS\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0""\312SG\0""\312SH\0""\312SI\0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue