1
0
forked from me/IronOS

Update GUIThread.cpp

This commit is contained in:
discip
2022-01-19 22:40:39 +01:00
committed by GitHub
parent af413a1b4b
commit f1addbf9a0

View File

@@ -852,12 +852,10 @@ void startGUITask(void const *argument) {
// Generate the flipped screen into ram for later use
// flipped is generated by flipping each row
for (int row = 0; row < 2; row++) {
for (int x = 0; x < 41; x++) {
buttonAF[(row * 41) + x] = buttonA[(row * 41) + (40 - x)];
disconnectedTipF[(row * 41) + x] = disconnectedTip[(row * 41) + (40 - x)];
}
for (int x = 0; x < 43; x++) {
buttonBF[(row * 43) + x] = buttonB[(row * 43) + (42 - x)];
for (int x = 0; x < 42; x++) {
buttonAF[(row * 42) + x] = buttonA[(row * 42) + (41 - x)];
buttonBF[(row * 42) + x] = buttonB[(row * 42) + (41 - x)];
disconnectedTipF[(row * 42) + x] = disconnectedTip[(row * 42) + (41 - x)];
}
}
}
@@ -969,9 +967,9 @@ void startGUITask(void const *argument) {
if (OLED::getRotation()) {
#endif
// in right handed mode we want to draw over the first part
OLED::drawArea(55, 0, 41, 16, disconnectedTipF);
OLED::drawArea(54, 0, 42, 16, disconnectedTipF);
} else {
OLED::drawArea(0, 0, 41, 16, disconnectedTip);
OLED::drawArea(0, 0, 42, 16, disconnectedTip);
}
#ifdef OLED_FLIP
if (!OLED::getRotation()) {
@@ -1035,13 +1033,13 @@ void startGUITask(void const *argument) {
#else
if (OLED::getRotation()) {
#endif
OLED::drawArea(55, 0, 41, 16, buttonA);
OLED::drawArea(12, 0, 43, 16, buttonB);
OLED::drawArea(54, 0, 42, 16, buttonAF);
OLED::drawArea(12, 0, 42, 16, buttonBF);
OLED::setCursor(0, 0);
gui_drawBatteryIcon();
} else {
OLED::drawArea(0, 0, 41, 16, buttonAF); // Needs to be flipped so button ends up
OLED::drawArea(41, 0, 43, 16, buttonBF); // on right side of screen
OLED::drawArea(0, 0, 42, 16, buttonA); // Needs to be flipped so button ends up
OLED::drawArea(42, 0, 42, 16, buttonB); // on right side of screen
OLED::setCursor(84, 0);
gui_drawBatteryIcon();
}
@@ -1083,9 +1081,9 @@ void startGUITask(void const *argument) {
if (OLED::getRotation()) {
#endif
// in right handed mode we want to draw over the first part
OLED::drawArea(55, 0, 41, 16, disconnectedTipF);
OLED::drawArea(54, 0, 42, 16, disconnectedTipF);
} else {
OLED::drawArea(0, 0, 41, 16, disconnectedTip);
OLED::drawArea(0, 0, 42, 16, disconnectedTip);
}
}
}