diff --git a/workspace/ts100/src/Main.c b/workspace/ts100/src/Main.c index 004308c4..aaf139cf 100644 --- a/workspace/ts100/src/Main.c +++ b/workspace/ts100/src/Main.c @@ -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) } diff --git a/workspace/ts100/src/Modes.c b/workspace/ts100/src/Modes.c index cd0afa3b..34d01a65 100644 --- a/workspace/ts100/src/Modes.c +++ b/workspace/ts100/src/Modes.c @@ -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); diff --git a/workspace/ts100/src/Strings.c b/workspace/ts100/src/Strings.c index deb17a47..6831cfa9 100644 --- a/workspace/ts100/src/Strings.c +++ b/workspace/ts100/src/Strings.c @@ -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 ", - " Ruhetemperatur ", " Ruhemodus nach ", - " Abschaltzeit ", - " Bewegungsempfindlichkeit <0.Aus 1.Minimal 9.Maximal>", - " Temperatur Einheit", " Temperatur Runden", - " Temperaturanzeige Updaterate", - " Anzeigerichtung ", - " Fronttaste für Temperaturboost einschalten", - " Temperatur im \"boost\"-Modus", - " Ändert \"Temperaturpfeile\" in Leistungsbalken", - " Automatischer Start beim Einschalten. J=Löttemp., R=Ruhemodus,N=Aus", - " Temperatur blinkt beim Abkühlen, solange noch heiß."}; + { + /*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 ", + " Ruhetemperatur ", " Ruhemodus nach ", + " Abschaltzeit ", + " Bewegungsempfindlichkeit <0.Aus 1.Minimal 9.Maximal>", + " Temperatur Einheit", " Temperatur Runden", + " Temperaturanzeige Updaterate", + " Anzeigerichtung ", + " Fronttaste für Temperaturboost einschalten", + " Temperatur im \"boost\"-Modus", + " Ändert \"Temperaturpfeile\" in Leistungsbalken", + " Automatischer Start beim Einschalten. J=Löttemp., R=Ruhemodus,N=Aus", + " Temperatur blinkt beim Abkühlen, solange noch heiß." }; -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';