Fix the blinking display on cooling screen
This commit is contained in:
@@ -21,7 +21,11 @@ int main(void) {
|
|||||||
if (systemSettings.autoStart) {
|
if (systemSettings.autoStart) {
|
||||||
InterruptMask = 1; //set the mask
|
InterruptMask = 1; //set the mask
|
||||||
lastMovement = 0;
|
lastMovement = 0;
|
||||||
}
|
} else
|
||||||
|
InterruptMask = 0;
|
||||||
|
if (readIronTemp(0, 1, 0xFFFF) > 500)
|
||||||
|
operatingMode = COOLING;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
Clear_Watchdog(); //reset the Watch dog timer
|
Clear_Watchdog(); //reset the Watch dog timer
|
||||||
ProcessUI();
|
ProcessUI();
|
||||||
@@ -40,7 +44,8 @@ int main(void) {
|
|||||||
//^ This is a workaround for the IRQ being set off before we have the handler setup and enabled.
|
//^ This is a workaround for the IRQ being set off before we have the handler setup and enabled.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)&&!InterruptMask) {
|
if ((GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_5) == Bit_RESET)
|
||||||
|
&& (!InterruptMask)) {
|
||||||
lastMovement = millis();
|
lastMovement = millis();
|
||||||
//This is a workaround for the line staying low as the user is still moving. (ie sensitivity is too high for their amount of movement)
|
//This is a workaround for the line staying low as the user is still moving. (ie sensitivity is too high for their amount of movement)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ void ProcessUI() {
|
|||||||
settingsPage = 0; //reset
|
settingsPage = 0; //reset
|
||||||
operatingMode = STARTUP; //reset back to the startup
|
operatingMode = STARTUP; //reset back to the startup
|
||||||
saveSettings(); //Save the settings
|
saveSettings(); //Save the settings
|
||||||
|
StartUp_Accelerometer(systemSettings.sensitivity); //Start the accelerometer
|
||||||
|
|
||||||
} else if (Buttons & BUT_B) {
|
} else if (Buttons & BUT_B) {
|
||||||
//A key iterates through the menu
|
//A key iterates through the menu
|
||||||
@@ -164,6 +165,8 @@ void ProcessUI() {
|
|||||||
settingsPage = 0; //reset
|
settingsPage = 0; //reset
|
||||||
operatingMode = STARTUP; //reset back to the startup
|
operatingMode = STARTUP; //reset back to the startup
|
||||||
saveSettings(); //Save the settings
|
saveSettings(); //Save the settings
|
||||||
|
StartUp_Accelerometer(systemSettings.sensitivity); //Start the accelerometer
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
++settingsPage; //move to the next option
|
++settingsPage; //move to the next option
|
||||||
}
|
}
|
||||||
@@ -436,6 +439,7 @@ void DrawUI() {
|
|||||||
|
|
||||||
OLED_DrawIDLELogo(); //Draw the icons for prompting the user
|
OLED_DrawIDLELogo(); //Draw the icons for prompting the user
|
||||||
temp = readIronTemp(0, 1, 0xFFFF);//to update the internal filter buffer
|
temp = readIronTemp(0, 1, 0xFFFF);//to update the internal filter buffer
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SOLDERING:
|
case SOLDERING:
|
||||||
//The user is soldering
|
//The user is soldering
|
||||||
@@ -733,10 +737,14 @@ void DrawUI() {
|
|||||||
OLED_DrawString(CoolingPromptString, 5);
|
OLED_DrawString(CoolingPromptString, 5);
|
||||||
temp = readIronTemp(0, 1, 0xFFFF); //force temp re-reading
|
temp = readIronTemp(0, 1, 0xFFFF); //force temp re-reading
|
||||||
|
|
||||||
drawTemp(temp, 5, systemSettings.temperatureRounding);
|
|
||||||
if (temp > 500 && systemSettings.coolingTempBlink
|
if (temp > 500 && systemSettings.coolingTempBlink
|
||||||
&& (millis() % 1000) > 500)
|
&& (millis() % 1000) > 500) {
|
||||||
OLED_InvertBuffer();
|
|
||||||
|
} else {
|
||||||
|
drawTemp(temp, 5, systemSettings.temperatureRounding);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case UVLOWARN:
|
case UVLOWARN:
|
||||||
OLED_DrawString(UVLOWarningString, 8);
|
OLED_DrawString(UVLOWarningString, 8);
|
||||||
|
|||||||
@@ -77,25 +77,25 @@ const char SettingTempFChar = 'F';
|
|||||||
#endif
|
#endif
|
||||||
#ifdef LANG_DE
|
#ifdef LANG_DE
|
||||||
const char* SettingsLongNames[14] =
|
const char* SettingsLongNames[14] =
|
||||||
{
|
{
|
||||||
/*These are all the help text for all the settings.*/
|
/*These are all the help text for all the settings.*/
|
||||||
/*All must start with 6 spaces so they come on screen nicely.*/
|
/*All must start with 6 spaces so they come on screen nicely.*/
|
||||||
" Stromversorgung. Setzt Abschaltspannung <DC 10V> <S 3.3V per cell>",
|
" Stromversorgung. Setzt Abschaltspannung <DC 10V> <S 3.3V pro Zelle>",
|
||||||
" Ruhetemperatur <C>", " Ruhemodus nach <Minuten>",
|
" Ruhetemperatur <C>", " Ruhemodus nach <Minuten>",
|
||||||
" Abschaltzeit <Minuten>",
|
" Abschaltzeit <Minuten>",
|
||||||
" Bewegungsempfindlichkeit <0.Aus 1.Minimal 9.Maximal>",
|
" Bewegungsempfindlichkeit <0.Aus 1.Minimal 9.Maximal>",
|
||||||
" Temperatur Einheit", " Temperatur Runden",
|
" Temperatur Einheit", " Temperatur Runden",
|
||||||
" Temperaturanzeige Updaterate",
|
" Temperaturanzeige Updaterate",
|
||||||
" Anzeigerichtung <A. Automatisch L. Linksh<73>ndig R. Rechtsh<73>ndig>",
|
" Anzeigerichtung <A. Auto L. Linksh<73>ndig R. Rechtsh<73>ndig>",
|
||||||
" Fronttaste f<>r Temperaturboost einschalten",
|
" Fronttaste f<>r Temperaturboost einschalten",
|
||||||
" Temperatur im \"boost\"-Modus",
|
" Temperatur im \"boost\"-Modus",
|
||||||
" <20>ndert \"Temperaturpfeile\" in Leistungsbalken",
|
" <20>ndert \"Temperaturpfeile\" in Leistungsbalken",
|
||||||
" Automatischer Start beim Einschalten. J=L<>ttemp., R=Ruhemodus,N=Aus",
|
" Automatischer Start beim Einschalten. J=L<>ttemp., R=Ruhemodus,N=Aus",
|
||||||
" Temperatur blinkt beim Abk<62>hlen, solange noch hei<65>."};
|
" Temperatur blinkt beim Abk<62>hlen, solange noch hei<65>." };
|
||||||
|
|
||||||
const char* TempCalStatus[3] = {"Cal Temp", "Cal OK ", "Cal Fehl"}; //All fixed 8 chars
|
const char* TempCalStatus[3] = { "Cal Temp", "Cal OK ", "Cal Fehl" }; //All fixed 8 chars
|
||||||
const char* UVLOWarningString = "V gering";//Fixed width 8 chars
|
const char* UVLOWarningString = "V gering"; //Fixed width 8 chars
|
||||||
const char* CoolingPromptString = "Kalt ";//Fixed width 5 chars
|
const char* CoolingPromptString = "Kalt "; //Fixed width 5 chars
|
||||||
const char SettingTrueChar = 'J';
|
const char SettingTrueChar = 'J';
|
||||||
const char SettingFalseChar = 'N';
|
const char SettingFalseChar = 'N';
|
||||||
const char SettingSleepChar = 'R';
|
const char SettingSleepChar = 'R';
|
||||||
|
|||||||
Reference in New Issue
Block a user