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

Draw slider on calibration screen

This commit is contained in:
Nicholas-Luoyi 2025-04-29 14:16:11 +08:00
parent dd50d6ec34
commit 42dbdab5db
No known key found for this signature in database
GPG key ID: AA1A937363D17486
2 changed files with 10 additions and 2 deletions

View file

@ -30,7 +30,10 @@ struct {
#endif #endif
#define BIGSIZE DBLSIZE #define BIGSIZE DBLSIZE
#if defined (PCBTARANIS) #if defined (RADIO_V10)
#define LBOX_CENTERX (LCD_W/4 + 5)
#define RBOX_CENTERX (3*LCD_W/4 - 4)
#elif defined (PCBTARANIS)
#define LBOX_CENTERX (LCD_W/4 + 14) #define LBOX_CENTERX (LCD_W/4 + 14)
#define RBOX_CENTERX (3*LCD_W/4 - 13) #define RBOX_CENTERX (3*LCD_W/4 - 13)
#else #else
@ -83,7 +86,7 @@ void drawExternalAntennaAndRSSI()
void drawPotsBars() void drawPotsBars()
{ {
#if defined(RADIO_V10) #if defined(RADIO_V10)
#define NUM_POT_BARS 2 #define NUM_POT_BARS 6
#else #else
#define NUM_POT_BARS (NUM_POTS + NUM_SLIDERS) #define NUM_POT_BARS (NUM_POTS + NUM_SLIDERS)
#endif #endif

View file

@ -280,7 +280,12 @@ void memswap(void * a, void * b, uint8_t size);
#define IS_POT_MULTIPOS(x) (IS_POT(x) && POT_CONFIG(x)==POT_MULTIPOS_SWITCH) #define IS_POT_MULTIPOS(x) (IS_POT(x) && POT_CONFIG(x)==POT_MULTIPOS_SWITCH)
#define IS_POT_WITHOUT_DETENT(x) (IS_POT(x) && POT_CONFIG(x)==POT_WITHOUT_DETENT) #define IS_POT_WITHOUT_DETENT(x) (IS_POT(x) && POT_CONFIG(x)==POT_WITHOUT_DETENT)
#define IS_POT_AVAILABLE(x) (IS_POT(x) && POT_CONFIG(x)!=POT_NONE) #define IS_POT_AVAILABLE(x) (IS_POT(x) && POT_CONFIG(x)!=POT_NONE)
#if defined(RADIO_V10)
#define IS_SLIDER_AVAILABLE(x) ((x) == SLIDER1 || (x) == SLIDER2 || (IS_SLIDER(x) && (g_eeGeneral.slidersConfig & (0x01 << ((x)-SLIDER1)))))
#define IS_POT_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x) || IS_SLIDER_AVAILABLE(x))
#else
#define IS_POT_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x)) #define IS_POT_SLIDER_AVAILABLE(x) (IS_POT_AVAILABLE(x))
#endif
#define IS_MULTIPOS_CALIBRATED(cal) (cal->count>0 && cal->count<XPOTS_MULTIPOS_COUNT) #define IS_MULTIPOS_CALIBRATED(cal) (cal->count>0 && cal->count<XPOTS_MULTIPOS_COUNT)
#else #else
#define IS_POT_MULTIPOS(x) (false) #define IS_POT_MULTIPOS(x) (false)