diff --git a/workspace/TS100/inc/Translation.h b/workspace/TS100/inc/Translation.h index 9624bfb147..26bbfd93e4 100644 --- a/workspace/TS100/inc/Translation.h +++ b/workspace/TS100/inc/Translation.h @@ -24,6 +24,11 @@ extern const char SettingLeftChar; extern const char SettingAutoChar; #define LANG_EN - +//#define LANG_RU +//#define LANG_ES +//#define LANG_SE +//#define LANG_IT +//#define LANG_FR +//#define LANG_DE #endif /* TRANSLATION_H_ */ diff --git a/workspace/TS100/src/Translation.c b/workspace/TS100/src/Translation.c index cd1d3a1fdf..c084447618 100644 --- a/workspace/TS100/src/Translation.c +++ b/workspace/TS100/src/Translation.c @@ -7,21 +7,56 @@ #include "Translation.h" #ifdef LANG_EN +const char* SettingsLongNames[16] = { +/*These are all the help text for all the settings.*/ +/*No requirements on spacing or length*/ +"Power source. Sets cutoff voltage. ", //Power Source + "Sleep Temperature ", //Sleep Temp + "Sleep Timeout ", //Sleep Timeout + "Shutdown Timeout ", //Shutdown Time + "Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>", //Motion Sensitivity + "Temperature Unit ", //Temp Unit + "Display detailed information in a smaller font on the idle screen.", //Detailed Information + "Display Orientation ", //Orientation + "Enable front key enters boost mode 450C mode when soldering", //Boost enable + "Temperature when in \"boost\" mode", //Boost Temp + "Automatically starts the iron into soldering on power up. T=Soldering, S= Sleep mode,F=Off", //Auto start + "Blink the temperature on the cooling screen while the tip is still hot.", //Cooling Blink + "Calibrate tip offset.", //Calibrate Tip + "Reset all settings", //Reset Settings + "VIN Calibration. Buttons adjust, long press to exit", //VIN Cal + "Display detailed information while soldering", //ADV SLD + }; + +const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; +const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars +const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars +const char* WarningSimpleString = "HOT!"; //Must be <= 4 chars +const char* WarningAdvancedString = "WARNING! TIP HOT!"; + +const char SettingTrueChar = 'T'; +const char SettingFalseChar = 'F'; +const char SettingRightChar = 'R'; +const char SettingLeftChar = 'L'; +const char SettingAutoChar = 'A'; +#endif +#ifdef LANG_RU const char* SettingsLongNames[16] = { /*These are all the help text for all the settings.*/ /*No requirements on spacing or length*/ - "Power source. Sets cutoff voltage. ", //Power Source - "Sleep Temperature ",//Sleep Temp - "Sleep Timeout ",//Sleep Timeout - "Shutdown Timeout ",//Shutdown Time - "Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>",//Motion Sensitivity - "Temperature Unit ",//Temp Unit + "Источник питания. Установка напряжения отключения. ", //Cell count + "Температура Сна <С>",//Sleep Temp + "Переход в режим Сна <Минуты>",//Sleep timeout + "Переходит в режим ожидания <Минуты>",//Shutdown timeout + "Акселерометр <0. Выкл. 1. мин. чувствительный 9. макс. чувствительный>",//Sensitivity + "В чем измерять температуру",//Temp Unit "Display detailed information in a smaller font on the idle screen.",//Detailed Information - "Display Orientation ",//Orientation - "Enable front key enters boost mode 450C mode when soldering",//Boost enable - "Temperature when in \"boost\" mode",//Boost Temp - "Automatically starts the iron into soldering on power up. T=Soldering, S= Sleep mode,F=Off",//Auto start - "Blink the temperature on the cooling screen while the tip is still hot.",//Cooling Blink + "Ориентация Дисплея ",//Orientation + "Активация кнопки A для Турбо режима до 450С при пайке ",//Boost enable + "Установка температуры для Турбо режима",//Boost temp + "Автоматический запуск паяльника при включении питания. T=Нагрев, S= Режим Сна,F=Выкл.",//Auto start + "Мигает температура на экране охлаждения, пока жало остается горячим."//Cooling blink "Calibrate tip offset.",//Calibrate Tip "Reset all settings",//Reset Settings "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal @@ -41,33 +76,173 @@ const char SettingRightChar = 'R'; const char SettingLeftChar = 'L'; const char SettingAutoChar = 'A'; #endif -#ifdef LANG_RU +#ifdef LANG_ES const char* SettingsLongNames[16] = { -/*These are all the help text for all the settings.*/ -/*No requirements on spacing or length*/ - "Источник питания. Установка напряжения отключения. ", //Cell count - "Температура Сна <С>", //Sleep Temp - "Переход в режим Сна <Минуты>", //Sleep timeout - "Переходит в режим ожидания <Минуты>", //Shutdown timeout - "Акселерометр <0. Выкл. 1. мин. чувствительный 9. макс. чувствительный>", //Sensitivity - "В чем измерять температуру", //Temp Unit - "Display detailed information in a smaller font on the idle screen.", //Detailed Information - "Ориентация Дисплея ", //Orientation - "Активация кнопки A для Турбо режима до 450С при пайке ", //Boost enable - "Установка температуры для Турбо режима", //Boost temp - "Автоматический запуск паяльника при включении питания. T=Нагрев, S= Режим Сна,F=Выкл.", //Auto start - "Мигает температура на экране охлаждения, пока жало остается горячим." //Cooling blink - "Calibrate tip offset.",//Calibrate Tip - "Reset all settings", //Reset Settings - "VIN Calibration. Buttons adjust, long press to exit", //VIN Cal - "Display detailed information while soldering", //ADV SLD - }; + /*These are all the help text for all the settings.*/ + /*No requirements on spacing or length*/ + "Fuente de energía. Ajusta el límite inferior de voltaje. ", + "Temperatura en reposo. ", + "Tiempo hasta activar reposo. ", + "Tiempo hasta apagado. ", + "Sensibilidad del movimiento. <0=Apagado 1=El menos sensible 9=El más sensible>", + "Unidad de temperatura.", + "Display detailed information in a smaller font on the idle screen.", //Detailed Information + "Orientación de la pantalla ", + "Activar el botón \"Boost\" en modo soldadura.", + "Temperatura en modo \"Boost\". ", + "Iniciar modo soldadura en el encendido. ", + "Parpadea la temperatura en el enfriamiento si la punta sigue caliente." + "Calibrate tip offset.",//Calibrate Tip + "Reset all settings",//Reset Settings + "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal + "Display detailed information while soldering",//ADV SLD +}; const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars -const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars -const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars -const char* WarningSimpleString = "HOT!"; //Must be <= 4 chars +const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping...";// <=17 chars +const char* WarningSimpleString = "HOT!";//Must be <= 4 chars +const char* WarningAdvancedString = "WARNING! TIP HOT!"; + +const char SettingTrueChar = 'T'; +const char SettingFalseChar = 'F'; +const char SettingRightChar = 'R'; +const char SettingLeftChar = 'L'; +const char SettingAutoChar = 'A'; +#endif +#ifdef LANG_SE +const char* SettingsLongNames[16] = { + /*These are all the help text for all the settings.*/ + /*No requirements on spacing or length*/ + "Источник питания. Установка напряжения отключения. ", //Cell count + "Температура Сна <С>",//Sleep Temp + "Переход в режим Сна <Минуты>",//Sleep timeout + "Переходит в режим ожидания <Минуты>",//Shutdown timeout + "Акселерометр <0. Выкл. 1. мин. чувствительный 9. макс. чувствительный>",//Sensitivity + "В чем измерять температуру",//Temp Unit + "Display detailed information in a smaller font on the idle screen.",//Detailed Information + "Ориентация Дисплея ",//Orientation + "Активация кнопки A для Турбо режима до 450С при пайке ",//Boost enable + "Установка температуры для Турбо режима",//Boost temp + "Автоматический запуск паяльника при включении питания. T=Нагрев, S= Режим Сна,F=Выкл.",//Auto start + "Мигает температура на экране охлаждения, пока жало остается горячим."//Cooling blink + "Calibrate tip offset.",//Calibrate Tip + "Reset all settings",//Reset Settings + "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal + "Display detailed information while soldering",//ADV SLD +}; + +const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; +const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars +const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping...";// <=17 chars +const char* WarningSimpleString = "HOT!";//Must be <= 4 chars +const char* WarningAdvancedString = "WARNING! TIP HOT!"; + +const char SettingTrueChar = 'T'; +const char SettingFalseChar = 'F'; +const char SettingRightChar = 'R'; +const char SettingLeftChar = 'L'; +const char SettingAutoChar = 'A'; +#endif +#ifdef LANG_IT +const char* SettingsLongNames[16] = { + /*These are all the help text for all the settings.*/ + /*No requirements on spacing or length*/ + "Sorgente di alimentazione. Imposta il limite inferiore di tensione. ", + "Temperatura modalità riposo ", + "Timeout per passaggio a modalità riposo ", + "Timeout spegnimento ", + "Sensibilità al movimento <0=Spento 1=Sensibilità minima 9=Sensibilità massima>", + "Unità di temperatura", + "Display detailed information in a smaller font on the idle screen.", //Detailed Information + "Orientamento del display ", + "Il tasto anteriore abilita modalità \"boost\" fino a 450C durante la saldatura", + "Temperatura in modalità \"boost\" ", + "Avvia automaticamente il saldatore quando viene alimentato. ", + "Durante lo spegnimento la temperatura lampeggia sul display finché la punta è calda." + "Calibrate tip offset.",//Calibrate Tip + "Reset all settings",//Reset Settings + "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal + "Display detailed information while soldering",//ADV SLD +}; + +const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; +const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars +const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping...";// <=17 chars +const char* WarningSimpleString = "HOT!";//Must be <= 4 chars +const char* WarningAdvancedString = "WARNING! TIP HOT!"; + +const char SettingTrueChar = 'T'; +const char SettingFalseChar = 'F'; +const char SettingRightChar = 'R'; +const char SettingLeftChar = 'L'; +const char SettingAutoChar = 'A'; +#endif +#ifdef LANG_FR +const char* SettingsLongNames[16] = { + /*These are all the help text for all the settings.*/ + /*No requirements on spacing or length*/ + "Type d\'alimentation. Regle la tension de coupure. ", + "Temperature en veille. ", + "Temps avant mise en veille. ", + "Temps avant extinction. ", + "Sensibilitee du capteur de mouvement. <0=Inactif 1=Peu sensible 9=Tres sensible>", + "Unitee de temperature.", + "Display detailed information in a smaller font on the idle screen.", //Detailed Information + "Orientation de l\'affichage. ", + "Active le mode \"Boost\" 450C sur le bouton de devant pendant la soudure.", + "Temperature du mode \"Boost\". ", + "Demarre automatiquement la soudure a l\'allumage. ", + "Fait clignotter la temperature pendant la phase de refroidissement quand la panne est chaude." + "Calibrate tip offset.",//Calibrate Tip + "Reset all settings",//Reset Settings + "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal + "Display detailed information while soldering",//ADV SLD +}; + +const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; +const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars +const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping...";// <=17 chars +const char* WarningSimpleString = "HOT!";//Must be <= 4 chars +const char* WarningAdvancedString = "WARNING! TIP HOT!"; + +const char SettingTrueChar = 'T'; +const char SettingFalseChar = 'F'; +const char SettingRightChar = 'R'; +const char SettingLeftChar = 'L'; +const char SettingAutoChar = 'A'; +#endif +#ifdef LANG_DE +const char* SettingsLongNames[16] = { + /*These are all the help text for all the settings.*/ + /*No requirements on spacing or length*/ + "Stromversorgung. Setzt Abschaltspannung ", + "Ruhetemperatur ", + "Ruhemodus nach ", + "Abschaltzeit ", + "Bewegungsempfindlichkeit <0=Aus 1=Minimal 9=Maximal>", + "Temperatur Einheit", + "Display detailed information in a smaller font on the idle screen.", //Detailed Information + "Anzeigerichtung ", + "Fronttaste für Temperaturboost einschalten", + "Temperatur im \"boost\"-Modus ", + "Automatischer Start beim Einschalten. ", + "Temperatur blinkt beim Abkühlen, solange noch heiß." + "Calibrate tip offset.",//Calibrate Tip + "Reset all settings",//Reset Settings + "VIN Calibration. Buttons adjust, long press to exit",//VIN Cal + "Display detailed information while soldering",//ADV SLD +}; + +const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!"; +const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars +const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars +const char* SleepingAdvancedString = "Sleeping...";// <=17 chars +const char* WarningSimpleString = "HOT!";//Must be <= 4 chars const char* WarningAdvancedString = "WARNING! TIP HOT!"; const char SettingTrueChar = 'T'; diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 5615f56c18..d0dc8fcc4d 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -75,6 +75,21 @@ int main(void) { void GUIDelay() { osDelay(50); //20Hz } +void gui_drawTipTemp() { + //Draw tip temp handling unit conversion & tolerance near setpoint + uint16_t Temp = getTipRawTemp(0); + + if (systemSettings.temperatureInF) + Temp = tipMeasurementToF(Temp); + else + Temp = tipMeasurementToC(Temp); + //Round if nearby + if (abs(Temp - systemSettings.SolderingTemp) < 3) + Temp = systemSettings.SolderingTemp; + + lcd.printNumber(Temp, 3); //Draw the tip temp out finally + +} ButtonState getButtonState() { /* * Read in the buttons and then determine if a state change needs to occur @@ -551,10 +566,10 @@ static void gui_solderingMode() { lcd.drawChar(' '); // Space out gap between battery <-> temp if (systemSettings.temperatureInF) { - lcd.printNumber(tipMeasurementToF(tipTemp), 3); //Draw current tip temp + gui_drawTipTemp(); //Draw current tip temp lcd.drawSymbol(0); //deg F } else { - lcd.printNumber(tipMeasurementToC(tipTemp), 3); //Draw current tip temp + gui_drawTipTemp(); //Draw current tip temp lcd.drawSymbol(1); //deg C } @@ -585,10 +600,10 @@ static void gui_solderingMode() { lcd.drawChar(' '); if (systemSettings.temperatureInF) { - lcd.printNumber(tipMeasurementToF(tipTemp), 3); //Draw current tip temp + gui_drawTipTemp(); //Draw current tip temp lcd.drawSymbol(0); //deg F } else { - lcd.printNumber(tipMeasurementToC(tipTemp), 3); //Draw current tip temp + gui_drawTipTemp(); //Draw current tip temp lcd.drawSymbol(1); //deg C } @@ -689,7 +704,7 @@ void startGUITask(void const * argument) { lcd.clearScreen(); //Ensure the buffer starts clean lcd.setCursor(0, 0); //Position the cursor at the 0,0 (top left) lcd.setFont(1); //small font - lcd.print((char*) "V2.00a6"); //Print version number + lcd.print((char*) "V2.00"); //Print version number lcd.setCursor(0, 8); //second line lcd.print(__DATE__); //print the compile date lcd.refresh(); @@ -870,7 +885,7 @@ void startMOVTask(void const * argument) { #endif for (;;) { - int32_t threshold = 800 + (9 * 200); + int32_t threshold = 1200 + (9 * 200); threshold -= systemSettings.sensitivity * 200; // 200 is the step size accel.getAxisReadings(&tx, &ty, &tz);