mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Cleaning up files
Fixing warnings Add powerDisplayToggle
This commit is contained in:
@@ -40,7 +40,7 @@ void setup() {
|
||||
readIronTemp(systemSettings.tempCalibration, 0, 0); //load the default calibration value
|
||||
Init_Oled(systemSettings.flipDisplay); //Init the OLED display
|
||||
|
||||
OLED_DrawString("VER 1.15", 8); //Version Number
|
||||
OLED_DrawString("VER 1.16", 8); //Version Number
|
||||
delayMs(300); //Pause to show version number
|
||||
showBootLogoIfavailable();
|
||||
Start_Watchdog(1000); //start the system watch dog as 1 second timeout
|
||||
|
||||
@@ -22,9 +22,9 @@ void ProcessUI() {
|
||||
uint8_t Buttons = getButtons(); //read the buttons status
|
||||
static uint32_t lastModeChange = 0;
|
||||
if (getRawButtons() && ((millis() - getLastButtonPress()) > 1000)) {
|
||||
lastKeyPress = millis() - 600;
|
||||
lastKeyPress = millis() - 700;
|
||||
Buttons = getRawButtons();
|
||||
} else if (millis() - getLastButtonPress() < 80) {
|
||||
} else if (millis() - getLastButtonPress() < 100) {
|
||||
Buttons = 0;
|
||||
} else if (Buttons != 0) {
|
||||
resetButtons();
|
||||
|
||||
@@ -70,6 +70,7 @@ void resetSettings() {
|
||||
systemSettings.temperatureRounding = 0; //How the temperature is rounded off
|
||||
systemSettings.boostModeEnabled = 0;//Default to safe, with no boost mode
|
||||
systemSettings.BoostTemp = 4000; //default to 400C
|
||||
systemSettings.powerDisplay = 0; //default to power display being off
|
||||
}
|
||||
|
||||
void showBootLogoIfavailable() {
|
||||
@@ -87,16 +88,16 @@ void showBootLogoIfavailable() {
|
||||
|
||||
}
|
||||
/*char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
|
||||
'C', 'D', 'E', 'F' };
|
||||
'C', 'D', 'E', 'F' };
|
||||
|
||||
OLED_DrawChar(hex[(temp8[0] >> 4) & 0x0F], 0);
|
||||
OLED_DrawChar(hex[(temp8[0] >> 0) & 0x0F], 1);
|
||||
OLED_DrawChar(hex[(temp8[1] >> 4) & 0x0F], 2);
|
||||
OLED_DrawChar(hex[(temp8[1] >> 0) & 0x0F], 3);
|
||||
OLED_DrawChar(hex[(temp8[2] >> 4) & 0x0F], 4);
|
||||
OLED_DrawChar(hex[(temp8[2] >> 0) & 0x0F], 5);
|
||||
OLED_DrawChar(hex[(temp8[3] >> 4) & 0x0F], 6);
|
||||
OLED_DrawChar(hex[(temp8[3] >> 0) & 0x0F], 7);*/
|
||||
OLED_DrawChar(hex[(temp8[0] >> 4) & 0x0F], 0);
|
||||
OLED_DrawChar(hex[(temp8[0] >> 0) & 0x0F], 1);
|
||||
OLED_DrawChar(hex[(temp8[1] >> 4) & 0x0F], 2);
|
||||
OLED_DrawChar(hex[(temp8[1] >> 0) & 0x0F], 3);
|
||||
OLED_DrawChar(hex[(temp8[2] >> 4) & 0x0F], 4);
|
||||
OLED_DrawChar(hex[(temp8[2] >> 0) & 0x0F], 5);
|
||||
OLED_DrawChar(hex[(temp8[3] >> 4) & 0x0F], 6);
|
||||
OLED_DrawChar(hex[(temp8[3] >> 0) & 0x0F], 7);*/
|
||||
if (temp8[0] != 0xAA)
|
||||
return;
|
||||
if (temp8[1] != 0x55)
|
||||
@@ -106,7 +107,6 @@ void showBootLogoIfavailable() {
|
||||
if (temp8[3] != 0x0D)
|
||||
return;
|
||||
|
||||
|
||||
Oled_DrawArea(0, 0, 96, 16, (uint8_t*) (temp8 + 4));
|
||||
|
||||
delayMs(1000);
|
||||
|
||||
Reference in New Issue
Block a user