Compare commits
11 Commits
v2.0-alpha
...
v2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfa4c6e65b | ||
|
|
ed2f0db7f0 | ||
|
|
7cc0fd7c84 | ||
|
|
afa8257bce | ||
|
|
d7a9e1a9ea | ||
|
|
1bcdf42315 | ||
|
|
43b6d37bc6 | ||
|
|
bcf78dff4c | ||
|
|
0e7e304f4e | ||
|
|
0aae546dc9 | ||
|
|
2bf06caa09 |
@@ -24,16 +24,11 @@ extern const char SettingLeftChar;
|
|||||||
extern const char SettingAutoChar;
|
extern const char SettingAutoChar;
|
||||||
|
|
||||||
#define LANG_EN
|
#define LANG_EN
|
||||||
#define LANG
|
//#define LANG_RU
|
||||||
|
//#define LANG_ES
|
||||||
#ifndef LANG
|
//#define LANG_SE
|
||||||
#define LANG_EN
|
//#define LANG_IT
|
||||||
#define LANG
|
//#define LANG_FR
|
||||||
#endif
|
//#define LANG_DE
|
||||||
|
|
||||||
#ifndef LANG
|
|
||||||
#error NO LANGUAGE DEFINED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* TRANSLATION_H_ */
|
#endif /* TRANSLATION_H_ */
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ void OLED::refresh() {
|
|||||||
|
|
||||||
screenBuffer[12] = 0x40; //start of data marker
|
screenBuffer[12] = 0x40; //start of data marker
|
||||||
taskENTER_CRITICAL();
|
taskENTER_CRITICAL();
|
||||||
|
//Because I2C is shared, we cant task switch in the middle of the xfer
|
||||||
|
|
||||||
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, screenBuffer, 12 + 96 * 2 + 1, 0xFFFF);
|
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, screenBuffer, 12 + 96 * 2 + 1, 0xFFFF);
|
||||||
taskEXIT_CRITICAL();
|
taskEXIT_CRITICAL();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const char* SettingsLongNames[16] = {
|
|||||||
/*No requirements on spacing or length*/
|
/*No requirements on spacing or length*/
|
||||||
"Power source. Sets cutoff voltage. <DC 10V> <S 3.3V per cell>", //Power Source
|
"Power source. Sets cutoff voltage. <DC 10V> <S 3.3V per cell>", //Power Source
|
||||||
"Sleep Temperature <C>", //Sleep Temp
|
"Sleep Temperature <C>", //Sleep Temp
|
||||||
"Sleep Timeout <Minutes>", //Sleep Timeout
|
"Sleep Timeout <Minutes/Seconds>", //Sleep Timeout
|
||||||
"Shutdown Timeout <Minutes>", //Shutdown Time
|
"Shutdown Timeout <Minutes>", //Shutdown Time
|
||||||
"Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>", //Motion Sensitivity
|
"Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>", //Motion Sensitivity
|
||||||
"Temperature Unit <C=Celsius F=Fahrenheit>", //Temp Unit
|
"Temperature Unit <C=Celsius F=Fahrenheit>", //Temp Unit
|
||||||
@@ -25,7 +25,7 @@ const char* SettingsLongNames[16] = {
|
|||||||
"Calibrate tip offset.", //Calibrate Tip
|
"Calibrate tip offset.", //Calibrate Tip
|
||||||
"Reset all settings", //Reset Settings
|
"Reset all settings", //Reset Settings
|
||||||
"VIN Calibration. Buttons adjust, long press to exit", //VIN Cal
|
"VIN Calibration. Buttons adjust, long press to exit", //VIN Cal
|
||||||
"Display detailed information while soldering",//ADV SLD
|
"Display detailed information while soldering", //ADV SLD
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
||||||
@@ -41,7 +41,217 @@ const char SettingRightChar = 'R';
|
|||||||
const char SettingLeftChar = 'L';
|
const char SettingLeftChar = 'L';
|
||||||
const char SettingAutoChar = 'A';
|
const char SettingAutoChar = 'A';
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef LANG_RU
|
||||||
|
const char* SettingsLongNames[16] = {
|
||||||
|
/*These are all the help text for all the settings.*/
|
||||||
|
/*No requirements on spacing or length*/
|
||||||
|
"Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>", //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
|
||||||
|
"Ориентация Дисплея <A. Автоматический L. Левая Рука R. Правая Рука>",//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_ES
|
||||||
|
const char* SettingsLongNames[16] = {
|
||||||
|
/*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. <DC=10V S=3.3V por celda>",
|
||||||
|
"Temperatura en reposo. <C>",
|
||||||
|
"Tiempo hasta activar reposo. <Minutos>",
|
||||||
|
"Tiempo hasta apagado. <Minutos>",
|
||||||
|
"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 <A=Automático I=Mano izquierda D=Mano derecha>",
|
||||||
|
"Activar el botón \"Boost\" en modo soldadura.",
|
||||||
|
"Temperatura en modo \"Boost\". <C>",
|
||||||
|
"Iniciar modo soldadura en el encendido. <V=Sí S=Modo reposo F=No>",
|
||||||
|
"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* 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*/
|
||||||
|
"Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>", //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
|
||||||
|
"Ориентация Дисплея <A. Автоматический L. Левая Рука R. Правая Рука>",//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. <DC=10V S=3.3V per cella>",
|
||||||
|
"Temperatura modalità riposo <C>",
|
||||||
|
"Timeout per passaggio a modalità riposo <Minuti>",
|
||||||
|
"Timeout spegnimento <Minuti>",
|
||||||
|
"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 <A=Automatico S=Sinistrorso D=Destrorso>",
|
||||||
|
"Il tasto anteriore abilita modalità \"boost\" fino a 450C durante la saldatura",
|
||||||
|
"Temperatura in modalità \"boost\" <C>",
|
||||||
|
"Avvia automaticamente il saldatore quando viene alimentato. <S=Modalità saldatura R=Modalità riposo N=Spento>",
|
||||||
|
"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. <DC=10V S=3.3V par cellules>",
|
||||||
|
"Temperature en veille. <C>",
|
||||||
|
"Temps avant mise en veille. <Minutes>",
|
||||||
|
"Temps avant extinction. <Minutes>",
|
||||||
|
"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. <A=Automatique G=Gaucher D=Droitier>",
|
||||||
|
"Active le mode \"Boost\" 450C sur le bouton de devant pendant la soudure.",
|
||||||
|
"Temperature du mode \"Boost\". <C>",
|
||||||
|
"Demarre automatiquement la soudure a l\'allumage. <A=Active, V=Mode Veille, D=Desactive>",
|
||||||
|
"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 <DC=10V S=3.3V pro Zelle>",
|
||||||
|
"Ruhetemperatur <C>",
|
||||||
|
"Ruhemodus nach <Minuten>",
|
||||||
|
"Abschaltzeit <Minuten>",
|
||||||
|
"Bewegungsempfindlichkeit <0=Aus 1=Minimal 9=Maximal>",
|
||||||
|
"Temperatur Einheit",
|
||||||
|
"Display detailed information in a smaller font on the idle screen.", //Detailed Information
|
||||||
|
"Anzeigerichtung <A=Auto L=Linkshändig R=Rechtshändig>",
|
||||||
|
"Fronttaste für Temperaturboost einschalten",
|
||||||
|
"Temperatur im \"boost\"-Modus <C>",
|
||||||
|
"Automatischer Start beim Einschalten. <J=Löttemp R=Ruhemodus N=Aus>",
|
||||||
|
"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';
|
||||||
|
const char SettingFalseChar = 'F';
|
||||||
|
const char SettingRightChar = 'R';
|
||||||
|
const char SettingLeftChar = 'L';
|
||||||
|
const char SettingAutoChar = 'A';
|
||||||
|
#endif
|
||||||
|
//Currently the settings names are not translated
|
||||||
const char* SettingsShortNames[16] = { /**/
|
const char* SettingsShortNames[16] = { /**/
|
||||||
"PWRSC ", // Power Source (DC or batt)
|
"PWRSC ", // Power Source (DC or batt)
|
||||||
"STMP ", // Sleep Temperature
|
"STMP ", // Sleep Temperature
|
||||||
@@ -57,6 +267,5 @@ const char* SettingsShortNames[16] = { /**/
|
|||||||
"CLBLNK ", // Cooldown blink
|
"CLBLNK ", // Cooldown blink
|
||||||
"TMP CAL?", // Temperature calibration enter menu
|
"TMP CAL?", // Temperature calibration enter menu
|
||||||
"RESET? ", // Settings reset command
|
"RESET? ", // Settings reset command
|
||||||
"CAL VIN?",
|
"CAL VIN?", "ADVSLD ", //advanced soldering screens
|
||||||
"ADVSLD ", //advanced soldering screens
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,7 +73,22 @@ int main(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void GUIDelay() {
|
void GUIDelay() {
|
||||||
osDelay(50);//20Hz
|
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() {
|
ButtonState getButtonState() {
|
||||||
/*
|
/*
|
||||||
@@ -411,6 +426,12 @@ static int gui_showTipTempWarning() {
|
|||||||
GUIDelay();
|
GUIDelay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static uint16_t min(uint16_t a, uint16_t b) {
|
||||||
|
if (a > b)
|
||||||
|
return b;
|
||||||
|
else
|
||||||
|
return a;
|
||||||
|
}
|
||||||
static int gui_SolderingSleepingMode() {
|
static int gui_SolderingSleepingMode() {
|
||||||
//Drop to sleep temperature and display until movement or button press
|
//Drop to sleep temperature and display until movement or button press
|
||||||
|
|
||||||
@@ -424,9 +445,11 @@ static int gui_SolderingSleepingMode() {
|
|||||||
return 1; //return non-zero on error
|
return 1; //return non-zero on error
|
||||||
|
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
currentlyActiveTemperatureTarget = ftoTipMeasurement(systemSettings.SleepTemp);
|
currentlyActiveTemperatureTarget = ftoTipMeasurement(
|
||||||
|
min(systemSettings.SleepTemp, systemSettings.SolderingTemp));
|
||||||
else
|
else
|
||||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(systemSettings.SleepTemp);
|
currentlyActiveTemperatureTarget = ctoTipMeasurement(
|
||||||
|
min(systemSettings.SleepTemp, systemSettings.SolderingTemp));
|
||||||
//draw the lcd
|
//draw the lcd
|
||||||
uint16_t tipTemp;
|
uint16_t tipTemp;
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
@@ -543,10 +566,10 @@ static void gui_solderingMode() {
|
|||||||
|
|
||||||
lcd.drawChar(' '); // Space out gap between battery <-> temp
|
lcd.drawChar(' '); // Space out gap between battery <-> temp
|
||||||
if (systemSettings.temperatureInF) {
|
if (systemSettings.temperatureInF) {
|
||||||
lcd.printNumber(tipMeasurementToF(tipTemp), 3); //Draw current tip temp
|
gui_drawTipTemp(); //Draw current tip temp
|
||||||
lcd.drawSymbol(0); //deg F
|
lcd.drawSymbol(0); //deg F
|
||||||
} else {
|
} else {
|
||||||
lcd.printNumber(tipMeasurementToC(tipTemp), 3); //Draw current tip temp
|
gui_drawTipTemp(); //Draw current tip temp
|
||||||
lcd.drawSymbol(1); //deg C
|
lcd.drawSymbol(1); //deg C
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -577,10 +600,10 @@ static void gui_solderingMode() {
|
|||||||
lcd.drawChar(' ');
|
lcd.drawChar(' ');
|
||||||
|
|
||||||
if (systemSettings.temperatureInF) {
|
if (systemSettings.temperatureInF) {
|
||||||
lcd.printNumber(tipMeasurementToF(tipTemp), 3); //Draw current tip temp
|
gui_drawTipTemp(); //Draw current tip temp
|
||||||
lcd.drawSymbol(0); //deg F
|
lcd.drawSymbol(0); //deg F
|
||||||
} else {
|
} else {
|
||||||
lcd.printNumber(tipMeasurementToC(tipTemp), 3); //Draw current tip temp
|
gui_drawTipTemp(); //Draw current tip temp
|
||||||
lcd.drawSymbol(1); //deg C
|
lcd.drawSymbol(1); //deg C
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -681,7 +704,7 @@ void startGUITask(void const * argument) {
|
|||||||
lcd.clearScreen(); //Ensure the buffer starts clean
|
lcd.clearScreen(); //Ensure the buffer starts clean
|
||||||
lcd.setCursor(0, 0); //Position the cursor at the 0,0 (top left)
|
lcd.setCursor(0, 0); //Position the cursor at the 0,0 (top left)
|
||||||
lcd.setFont(1); //small font
|
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.setCursor(0, 8); //second line
|
||||||
lcd.print(__DATE__); //print the compile date
|
lcd.print(__DATE__); //print the compile date
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
@@ -791,9 +814,11 @@ void startPIDTask(void const * argument) {
|
|||||||
int32_t kp, ki, kd, kb;
|
int32_t kp, ki, kd, kb;
|
||||||
int32_t backoffOverflow = 0;
|
int32_t backoffOverflow = 0;
|
||||||
kp = 20;
|
kp = 20;
|
||||||
ki = 40;
|
ki = 50;
|
||||||
kd = 30;
|
kd = 40;
|
||||||
kb = 0;
|
kb = 0;
|
||||||
|
// REMEBER ^^^^ These constants are backwards
|
||||||
|
// They act as dividers, so to 'increase' a P term, you make the number smaller.
|
||||||
const int32_t itermMax = 40;
|
const int32_t itermMax = 40;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
uint16_t rawTemp = getTipRawTemp(1); //get instantaneous reading
|
uint16_t rawTemp = getTipRawTemp(1); //get instantaneous reading
|
||||||
@@ -860,7 +885,7 @@ void startMOVTask(void const * argument) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int32_t threshold = 800 + (9 * 200);
|
int32_t threshold = 1200 + (9 * 200);
|
||||||
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
|
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
|
||||||
accel.getAxisReadings(&tx, &ty, &tz);
|
accel.getAxisReadings(&tx, &ty, &tz);
|
||||||
|
|
||||||
@@ -886,7 +911,7 @@ void startMOVTask(void const * argument) {
|
|||||||
lcd.print(" ");
|
lcd.print(" ");
|
||||||
lcd.printNumber(abs(avgy - (int32_t) ty), 5);
|
lcd.printNumber(abs(avgy - (int32_t) ty), 5);
|
||||||
if ((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)) > max)
|
if ((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)) > max)
|
||||||
max = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
max = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
||||||
lcd.setCursor(0, 8);
|
lcd.setCursor(0, 8);
|
||||||
lcd.printNumber(max, 5);
|
lcd.printNumber(max, 5);
|
||||||
lcd.print(" ");
|
lcd.print(" ");
|
||||||
@@ -894,7 +919,7 @@ void startMOVTask(void const * argument) {
|
|||||||
lcd.printNumber((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)), 5);
|
lcd.printNumber((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)), 5);
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
if (HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET)
|
if (HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET)
|
||||||
max = 0;
|
max = 0;
|
||||||
#endif
|
#endif
|
||||||
//Only run the actual processing if the sensitivity is set (aka we are enabled)
|
//Only run the actual processing if the sensitivity is set (aka we are enabled)
|
||||||
if (systemSettings.sensitivity) {
|
if (systemSettings.sensitivity) {
|
||||||
|
|||||||
Reference in New Issue
Block a user