Add 4+2 super flexi layout (#7992)
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
|
||||
#define TRIM_LH_X 10
|
||||
#define TRIM_LV_X 24
|
||||
#define TRIM_RV_X (LCD_W-35)
|
||||
#define TRIM_RV_X (LCD_W-36)
|
||||
#define TRIM_RH_X (LCD_W-175)
|
||||
#define TRIM_V_Y 55
|
||||
#define TRIM_H_Y (LCD_H-37)
|
||||
@@ -47,10 +47,10 @@ void drawMainPots()
|
||||
drawVerticalSlider(LCD_W-18, TRIM_V_Y, 160, calibratedAnalogs[CALIBRATED_SLIDER_REAR_RIGHT], -RESX, RESX, 40, OPTION_SLIDER_TICKS | OPTION_SLIDER_BIG_TICKS | OPTION_SLIDER_SQUARE_BUTTON);
|
||||
}
|
||||
|
||||
void drawTrims(uint8_t flightMode)
|
||||
void drawTrims(uint8_t flightMode, bool sliderdisplayed)
|
||||
{
|
||||
for (uint8_t i=0; i<4; i++) {
|
||||
static const coord_t x[4] = { TRIM_LH_X, TRIM_LV_X, TRIM_RV_X, TRIM_RH_X };
|
||||
coord_t x[4] = { TRIM_LH_X, sliderdisplayed ? TRIM_LV_X : 4, sliderdisplayed ? TRIM_RV_X : TRIM_RV_X + 18, TRIM_RH_X };
|
||||
static uint8_t vert[4] = {0, 1, 1, 0};
|
||||
unsigned int stickIndex = CONVERT_MODE(i);
|
||||
coord_t xm = x[stickIndex];
|
||||
@@ -76,15 +76,15 @@ void drawTrims(uint8_t flightMode)
|
||||
}
|
||||
else {
|
||||
if (g_model.extendedTrims == 1) {
|
||||
drawHorizontalSlider(xm, TRIM_H_Y, 160, trim, TRIM_EXTENDED_MIN, TRIM_EXTENDED_MAX, 0, OPTION_SLIDER_EMPTY_BAR|OPTION_SLIDER_TRIM_BUTTON);
|
||||
drawHorizontalSlider(xm, sliderdisplayed ? TRIM_H_Y : TRIM_H_Y + 22, 160, trim, TRIM_EXTENDED_MIN, TRIM_EXTENDED_MAX, 0, OPTION_SLIDER_EMPTY_BAR|OPTION_SLIDER_TRIM_BUTTON);
|
||||
}
|
||||
else {
|
||||
drawHorizontalSlider(xm, TRIM_H_Y, 160, trim, TRIM_MIN, TRIM_MAX, 0, OPTION_SLIDER_EMPTY_BAR|OPTION_SLIDER_TRIM_BUTTON);
|
||||
drawHorizontalSlider(xm, sliderdisplayed ? TRIM_H_Y : TRIM_H_Y + 20, 160, trim, TRIM_MIN, TRIM_MAX, 0, OPTION_SLIDER_EMPTY_BAR|OPTION_SLIDER_TRIM_BUTTON);
|
||||
}
|
||||
if (g_model.displayTrims != DISPLAY_TRIMS_NEVER && trim != 0) {
|
||||
if (g_model.displayTrims == DISPLAY_TRIMS_ALWAYS || (trimsDisplayTimer > 0 && (trimsDisplayMask & (1<<i)))) {
|
||||
uint16_t x = xm + TRIM_LEN + (trim>0 ? -TRIM_LEN/2 : TRIM_LEN/2);
|
||||
lcdDrawNumber(x, TRIM_H_Y+2, trim, TINSIZE | CENTERED);
|
||||
lcdDrawNumber(x, sliderdisplayed ? TRIM_H_Y + 2 : TRIM_H_Y + 22, trim, TINSIZE | CENTERED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user