mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Style correction
This commit is contained in:
@@ -7,35 +7,32 @@ extern uint8_t buttonBF[sizeof(buttonB)];
|
|||||||
extern uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
extern uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
||||||
|
|
||||||
void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||||
bool tipDisconnected = isTipDisconnected();
|
bool tipDisconnected = isTipDisconnected();
|
||||||
bool isFlipped = OLED::getRotation();
|
bool isFlipped = OLED::getRotation();
|
||||||
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
||||||
// Flip and switch buttons accordingly
|
// Flip and switch buttons accordingly
|
||||||
OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA));
|
OLED::drawArea(isFlipped ? 68 : 0, 0, 56, 32, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA));
|
||||||
OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB));
|
OLED::drawArea(isFlipped ? 12 : 58, 0, 56, 32, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB));
|
||||||
|
|
||||||
if ((tipTemp > 55) || tipDisconnected) {
|
if ((tipTemp > 55) || tipDisconnected) {
|
||||||
// draw temp over the start soldering button
|
// draw temp over the start soldering button
|
||||||
// Location changes on screen rotation
|
// Location changes on screen rotation and due to button swapping
|
||||||
// in right handed mode we want to draw over the first part
|
// in right handed mode we want to draw over the first part
|
||||||
OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area
|
OLED::fillArea(isReverse ? (isFlipped ? 26 : 58) : (isFlipped ? 68 : 0), 0, 56, 32, 0); // clear the area
|
||||||
OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0);
|
OLED::setCursor(isReverse ? (isFlipped ? 27 : 59) : (isFlipped ? 56 : 0), 0);
|
||||||
// If tip is connected draw the temp, otherwise - the notification
|
// If tip is disconnected draw the notification, otherwise - the temp
|
||||||
if (tipDisconnected) {
|
if (tipDisconnected) {
|
||||||
// Draw-in the missing tip symbol
|
// Draw-in the missing tip symbol
|
||||||
if (isReverse) {
|
if (isReverse) {
|
||||||
OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip);
|
OLED::drawArea(isFlipped ? 20 : 54, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip);
|
||||||
} else {
|
} else {
|
||||||
OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip);
|
OLED::drawArea(isFlipped ? 54 : 0, 0, 56, 32, isFlipped ? disconnectedTipF : disconnectedTip);
|
||||||
}// Draw-in the temp
|
}
|
||||||
|
} else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) {
|
||||||
|
ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp
|
||||||
} else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) {
|
}
|
||||||
ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
OLED::setCursor(isFlipped ? 0 : 116, 0);
|
OLED::setCursor(isFlipped ? 0 : 116, 0);
|
||||||
ui_draw_power_source_icon();
|
ui_draw_power_source_icon();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -6,33 +6,32 @@ extern uint8_t buttonBF[sizeof(buttonB)];
|
|||||||
extern uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
extern uint8_t disconnectedTipF[sizeof(disconnectedTip)];
|
||||||
|
|
||||||
void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
void ui_draw_homescreen_simplified(TemperatureType_t tipTemp) {
|
||||||
bool tipDisconnected = isTipDisconnected();
|
bool tipDisconnected = isTipDisconnected();
|
||||||
bool isFlipped = OLED::getRotation();
|
bool isFlipped = OLED::getRotation();
|
||||||
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
bool isReverse = getSettingValue(SettingsOptions::ReverseButtonNavEnabled);
|
||||||
// Flip and switch buttons accordingly
|
// Flip and switch buttons accordingly
|
||||||
OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA));
|
OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? (isReverse ? buttonBF : buttonAF) : (isReverse ? buttonB : buttonA));
|
||||||
OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB));
|
OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? (isReverse ? buttonAF : buttonBF) : (isReverse ? buttonA : buttonB));
|
||||||
|
|
||||||
if ((tipTemp > 55) || tipDisconnected) {
|
if ((tipTemp > 55) || tipDisconnected) {
|
||||||
// draw temp over the start soldering button
|
// draw temp over the start soldering button
|
||||||
// Location changes on screen rotation
|
// Location changes on screen rotation and due to button swapping
|
||||||
// in right handed mode we want to draw over the first part
|
// in right handed mode we want to draw over the first part
|
||||||
OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area
|
OLED::fillArea(isReverse ? (isFlipped ? 14 : 42) : (isFlipped ? 55 : 0), 0, 41, 16, 0); // clear the area
|
||||||
OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0);
|
OLED::setCursor(isReverse ? (isFlipped ? 15 : 43) : (isFlipped ? 56 : 0), 0);
|
||||||
// If tip is connected draw the temp, otherwise - the notification
|
// If tip is disconnected draw the notification, otherwise - the temp
|
||||||
if (tipDisconnected) {
|
if (tipDisconnected) {
|
||||||
// Draw-in the missing tip symbol
|
// Draw-in the missing tip symbol
|
||||||
if (isReverse) {
|
if (isReverse) {
|
||||||
OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
|
OLED::drawArea(isFlipped ? 12 : 42, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
|
||||||
} else {
|
} else {
|
||||||
OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
|
OLED::drawArea(isFlipped ? 54 : 0, 0, 42, 16, isFlipped ? disconnectedTipF : disconnectedTip);
|
||||||
}
|
}
|
||||||
} else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) {
|
} else if (!(getSettingValue(SettingsOptions::CoolingTempBlink) && (xTaskGetTickCount() % 1000 < 300))) {
|
||||||
ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp
|
ui_draw_tip_temperature(false, FontStyle::LARGE); // Draw-in the temp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OLED::setCursor(isFlipped ? 0 : 84, 0);
|
OLED::setCursor(isFlipped ? 0 : 84, 0);
|
||||||
ui_draw_power_source_icon();
|
ui_draw_power_source_icon();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user