view main decoration, sliders ticsk, T2,T3 swapped, potis sign
This commit is contained in:
@@ -35,7 +35,7 @@ void MainViewHorizontalSlider::paint(BitmapBuffer * dc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// The square
|
// The square
|
||||||
x = width() - TRIM_SQUARE_SIZE - divRoundClosest((width() - TRIM_SQUARE_SIZE) * (value + RESX), 2 * RESX);
|
x = divRoundClosest((width() - TRIM_SQUARE_SIZE) * (value + RESX), 2 * RESX);
|
||||||
drawTrimSquare(dc, x, 0, TRIM_BGCOLOR);
|
drawTrimSquare(dc, x, 0, TRIM_BGCOLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,19 +58,18 @@ void MainView6POS::paint(BitmapBuffer * dc)
|
|||||||
|
|
||||||
void MainViewVerticalSlider::paint(BitmapBuffer * dc)
|
void MainViewVerticalSlider::paint(BitmapBuffer * dc)
|
||||||
{
|
{
|
||||||
uint8_t slidersTick = height() / 5;
|
// The ticks
|
||||||
// The ticks
|
int delta = (height() - TRIM_SQUARE_SIZE) / SLIDER_TICKS_COUNT;
|
||||||
int delta = (height() - TRIM_SQUARE_SIZE) / slidersTick;
|
coord_t y = TRIM_SQUARE_SIZE / 2;
|
||||||
coord_t y = TRIM_SQUARE_SIZE / 2;
|
for (uint8_t i = 0; i <= SLIDER_TICKS_COUNT; i++) {
|
||||||
for (uint8_t i = 0; i <= slidersTick; i++) {
|
if (i == 0 || i == SLIDER_TICKS_COUNT / 2 || i == SLIDER_TICKS_COUNT)
|
||||||
if (i == 0 || i == slidersTick / 2 || i == slidersTick)
|
dc->drawSolidHorizontalLine(2, y, 13, DEFAULT_COLOR);
|
||||||
dc->drawSolidHorizontalLine(2, y, 13, DEFAULT_COLOR);
|
else
|
||||||
else
|
dc->drawSolidHorizontalLine(4, y, 9, DEFAULT_COLOR);
|
||||||
dc->drawSolidHorizontalLine(4, y, 9, DEFAULT_COLOR);
|
y += delta;
|
||||||
y += delta;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// The square
|
// The square
|
||||||
y = height() - TRIM_SQUARE_SIZE - divRoundClosest((height() - TRIM_SQUARE_SIZE) * (value + RESX), 2 * RESX);
|
y = divRoundClosest((height() - TRIM_SQUARE_SIZE) * (-value + RESX), 2 * RESX);
|
||||||
drawTrimSquare(dc, 0, y, TRIM_BGCOLOR);
|
drawTrimSquare(dc, 0, y, TRIM_BGCOLOR);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,8 +300,8 @@ void ViewMainDecoration::createTrims()
|
|||||||
VERTICAL_SLIDERS_HEIGHT
|
VERTICAL_SLIDERS_HEIGHT
|
||||||
};
|
};
|
||||||
|
|
||||||
trims[TRIMS_LV] = new MainViewVerticalTrim(this, r, 2);
|
trims[TRIMS_LV] = new MainViewVerticalTrim(this, r, 1);
|
||||||
trims[TRIMS_RV] = new MainViewVerticalTrim(this, r, 1);
|
trims[TRIMS_RV] = new MainViewVerticalTrim(this, r, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewMainDecoration::createFlightMode()
|
void ViewMainDecoration::createFlightMode()
|
||||||
|
|||||||
Reference in New Issue
Block a user