mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Add display inversion for cooling
This commit is contained in:
@@ -17,6 +17,7 @@ void OLED_Sync();
|
||||
void Oled_DrawArea(u8 x0, u8 y0, u8 wide, u8 height, const u8* ptr);
|
||||
void Set_ShowPos(u8 x, u8 y);
|
||||
void Oled_DisplayFlip();
|
||||
void OLED_InvertBuffer();
|
||||
void GPIO_Init_OLED(void);
|
||||
void Init_Oled(uint8_t leftHanded);
|
||||
const u8* Data_Command(u8 len, const u8* ptr);
|
||||
|
||||
@@ -731,11 +731,13 @@ void DrawUI() {
|
||||
Clear_Screen();
|
||||
OLED_DrawString(CoolingPromptString, 5);
|
||||
temp = readIronTemp(0, 1, 0xFFFF); //force temp re-reading
|
||||
if (temp < 500 || ((millis() % 1000) > 500)
|
||||
|| (!systemSettings.coolingTempBlink))
|
||||
|
||||
drawTemp(temp, 5, systemSettings.temperatureRounding);
|
||||
if (temp > 300)
|
||||
Oled_DisplayOn();
|
||||
if (temp > 500 && systemSettings.coolingTempBlink
|
||||
&& (millis() % 600) > 300)
|
||||
OLED_InvertBuffer();
|
||||
break;
|
||||
case UVLOWARN:
|
||||
OLED_DrawString(UVLOWarningString, 8);
|
||||
|
||||
@@ -136,7 +136,10 @@ void Oled_DrawArea(u8 x, u8 y, u8 wide, u8 height, const u8* ptr) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void OLED_InvertBuffer() {
|
||||
for (uint16_t i = 0; i < (2 * 96); i++)
|
||||
displayBuffer[i] = ~displayBuffer[i];
|
||||
}
|
||||
/*******************************************************************************
|
||||
Function:GPIO_Init_OLED
|
||||
Description:Init the outputs as needed for the OLED (in this case the RST line)
|
||||
|
||||
Reference in New Issue
Block a user