mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Merge branch '2.3.1' into 2.3
This commit is contained in:
commit
16ace5cb57
6 changed files with 21 additions and 16 deletions
|
@ -167,11 +167,13 @@ void drawSliders()
|
|||
{
|
||||
for (uint8_t i = NUM_STICKS; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||
#if defined(PCBX9E)
|
||||
if (i < SLIDER1) continue; // TODO change and display more values
|
||||
if (i < SLIDER1)
|
||||
continue; // TODO change and display more values
|
||||
coord_t x = ((i==SLIDER1 || i==SLIDER3) ? 3 : LCD_W-5);
|
||||
int8_t y = (i<SLIDER3 ? LCD_H/2+1 : 1);
|
||||
#else
|
||||
if (i == POT3) continue;
|
||||
if (i == POT3)
|
||||
continue;
|
||||
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
|
||||
|
|
|
@ -125,6 +125,7 @@ OpenTxSim::OpenTxSim(FXApp* a):
|
|||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
knobs[i]->setRange(-1024, 1024);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@
|
|||
9 /*TX_VOLTAGE*/, 10 /*TX_VBAT*/ };
|
||||
#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,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)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, 1,1, 1};
|
||||
#elif defined(PCBXLITE)
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,-1,1, -1,1, 1, 1};
|
||||
#else
|
||||
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, 1,1,0, 1,1, 1, 1};
|
||||
#endif
|
||||
|
||||
#if NUM_PWMSTICKS > 0
|
||||
|
|
|
@ -504,7 +504,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue