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