Diagnostic screen proper alignment for narrow screen.
This commit is contained in:
@@ -40,8 +40,13 @@ class RadioAnalogsDiagsWindow: public Window {
|
|||||||
void paint(BitmapBuffer * dc) override
|
void paint(BitmapBuffer * dc) override
|
||||||
{
|
{
|
||||||
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
for (uint8_t i = 0; i < NUM_STICKS + NUM_POTS + NUM_SLIDERS; i++) {
|
||||||
coord_t y = 1 + (i / 2) * FH;
|
#if LCD_W > LCD_H
|
||||||
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
coord_t y = 1 + (i / 2) * FH;
|
||||||
|
uint8_t x = i & 1 ? LCD_W / 2 + 10 : 10;
|
||||||
|
#else
|
||||||
|
coord_t y = 1 + i * FH;
|
||||||
|
uint8_t x = 10;
|
||||||
|
#endif
|
||||||
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
|
dc->drawNumber(x, y, i + 1, LEADING0 | LEFT, 2);
|
||||||
dc->drawText(x + 2 * 15 - 2, y, ":");
|
dc->drawText(x + 2 * 15 - 2, y, ":");
|
||||||
drawHexNumber(dc, x + 3 * 15 - 1, y, anaIn(i));
|
drawHexNumber(dc, x + 3 * 15 - 1, y, anaIn(i));
|
||||||
|
|||||||
Reference in New Issue
Block a user