mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update Makefile and build script
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
OUTPUT_EXE=TS100_$(lang)
|
||||||
|
ifndef lang
|
||||||
|
lang:= EN
|
||||||
|
endif
|
||||||
|
|
||||||
# Discover the source files to build
|
# Discover the source files to build
|
||||||
SOURCE := $(shell find . -type f -name '*.c')
|
SOURCE := $(shell find . -type f -name '*.c')
|
||||||
SOURCE_CPP := $(shell find . -type f -name '*.cpp')
|
SOURCE_CPP := $(shell find . -type f -name '*.cpp')
|
||||||
@@ -29,12 +35,7 @@ OPTIM=-O2 -finline-small-functions -findirect-inlining -fdiagnostics-color
|
|||||||
|
|
||||||
|
|
||||||
# global defines ---------------------------------------------------------------
|
# global defines ---------------------------------------------------------------
|
||||||
# Enable ROM library
|
GLOBAL_DEFINES += -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D LANG_$(lang)
|
||||||
#GLOBAL_DEFINES=-DTARGET_IS_BLIZZARD_RB1 -DUART_BUFFERED
|
|
||||||
# Without ROM library
|
|
||||||
#GLOBAL_DEFINES=-D DEPRECATED
|
|
||||||
#GLOBAL_DEFINES += -D SIMULATION_BOARD
|
|
||||||
GLOBAL_DEFINES += -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK
|
|
||||||
|
|
||||||
# Enable debug code generation
|
# Enable debug code generation
|
||||||
DEBUG=-g
|
DEBUG=-g
|
||||||
@@ -165,7 +166,7 @@ OBJS_CPP = $(SOURCE_CPP:.cpp=.o)
|
|||||||
OBJS_S = $(S_SRCS:.s=.o)
|
OBJS_S = $(S_SRCS:.s=.o)
|
||||||
|
|
||||||
|
|
||||||
OUTPUT_EXE=TS100
|
|
||||||
OUT_OBJS=$(addprefix $(OUTPUT_DIR)/,$(OBJS))
|
OUT_OBJS=$(addprefix $(OUTPUT_DIR)/,$(OBJS))
|
||||||
OUT_OBJS_CPP=$(addprefix $(OUTPUT_DIR)/,$(OBJS_CPP))
|
OUT_OBJS_CPP=$(addprefix $(OUTPUT_DIR)/,$(OBJS_CPP))
|
||||||
OUT_OBJS_S=$(addprefix $(OUTPUT_DIR)/,$(OBJS_S))
|
OUT_OBJS_S=$(addprefix $(OUTPUT_DIR)/,$(OBJS_S))
|
||||||
@@ -178,9 +179,9 @@ all: $(OUT_HEXFILE).hex
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Create hexfile
|
# Create hexfile
|
||||||
$(OUT_HEXFILE).hex : $(OUT_HEXFILE).elf
|
%.hex : %.elf
|
||||||
$(SIZE) -x $(OUT_HEXFILE).elf
|
$(SIZE) -x $^
|
||||||
$(OBJCOPY) $(OUT_HEXFILE).elf -O ihex $(OUT_HEXFILE).hex
|
$(OBJCOPY) $^ -O ihex $@
|
||||||
|
|
||||||
$(OUT_HEXFILE).elf : $(OUT_OBJS) $(OUT_OBJS_CPP) $(OUT_OBJS_S) Makefile $(LDSCRIPT)
|
$(OUT_HEXFILE).elf : $(OUT_OBJS) $(OUT_OBJS_CPP) $(OUT_OBJS_S) Makefile $(LDSCRIPT)
|
||||||
@test -d $(@D) || mkdir -p $(@D)
|
@test -d $(@D) || mkdir -p $(@D)
|
||||||
|
|||||||
25
workspace/TS100/build.sh
Executable file
25
workspace/TS100/build.sh
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
make clean
|
||||||
|
make -j16 lang=EN
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=CS_CZ
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=DE
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=DK
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=ES
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=FR
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=HR
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=IT
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=PL
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=RU
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=SE
|
||||||
|
rm -rf Objects/src
|
||||||
|
make -j16 lang=TR
|
||||||
|
rm -rf Objects/src
|
||||||
@@ -32,17 +32,5 @@ extern const char SettingRightChar;
|
|||||||
extern const char SettingLeftChar;
|
extern const char SettingLeftChar;
|
||||||
extern const char SettingAutoChar;
|
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
|
|
||||||
//#define LANG_CS_CZ
|
|
||||||
//#define LANG_TR
|
|
||||||
//#define LANG_HR
|
|
||||||
//#define LANG_PL
|
|
||||||
//#define LANG_DK
|
|
||||||
|
|
||||||
#endif /* TRANSLATION_H_ */
|
#endif /* TRANSLATION_H_ */
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "Translation.h"
|
#include "Translation.h"
|
||||||
|
|
||||||
// TEMPLATES for short names - choose one and use it as base for your translation:
|
// TEMPLATES for short names - choose one and use it as base for your
|
||||||
|
// translation:
|
||||||
|
|
||||||
// const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
// const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||||
// const char* SettingsShortNames[16][2] = {
|
// const char* SettingsShortNames[16][2] = {
|
||||||
@@ -34,18 +35,25 @@
|
|||||||
// /* (<= 9) Sleep temperature */ {"Sleep", "temp"},
|
// /* (<= 9) Sleep temperature */ {"Sleep", "temp"},
|
||||||
// /* (<= 9) Sleep timeout */ {"Sleep", "timeout"},
|
// /* (<= 9) Sleep timeout */ {"Sleep", "timeout"},
|
||||||
// /* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
|
// /* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
|
||||||
// /* (<= 13) Motion sensitivity level */ {"Motion", "sensitivity"},
|
// /* (<= 13) Motion sensitivity level */ {"Motion",
|
||||||
|
// "sensitivity"},
|
||||||
// /* (<= 13) Temperature in F and C */ {"Temperature", "units"},
|
// /* (<= 13) Temperature in F and C */ {"Temperature", "units"},
|
||||||
// /* (<= 13) Advanced idle display mode enabled */ {"Detailed", "idle screen"},
|
// /* (<= 13) Advanced idle display mode enabled */ {"Detailed", "idle
|
||||||
// /* (<= 13) Display rotation mode */ {"Display", "orientation"},
|
// screen"},
|
||||||
// /* (<= 13) Boost enabled */ {"Boost mode", "enabled"},
|
// /* (<= 13) Display rotation mode */ {"Display",
|
||||||
|
// "orientation"},
|
||||||
|
// /* (<= 13) Boost enabled */ {"Boost mode",
|
||||||
|
// "enabled"},
|
||||||
// /* (<= 9) Boost temperature */ {"Boost", "temp"},
|
// /* (<= 9) Boost temperature */ {"Boost", "temp"},
|
||||||
// /* (<= 13) Automatic start mode */ {"Auto", "start"},
|
// /* (<= 13) Automatic start mode */ {"Auto", "start"},
|
||||||
// /* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
|
// /* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
|
||||||
// /* (<= 16) Temperature calibration enter menu */ {"Calibrate", "temperature?"},
|
// /* (<= 16) Temperature calibration enter menu */ {"Calibrate",
|
||||||
|
// "temperature?"},
|
||||||
// /* (<= 16) Settings reset command */ {"Factory", "Reset?"},
|
// /* (<= 16) Settings reset command */ {"Factory", "Reset?"},
|
||||||
// /* (<= 16) Calibrate input voltage */ {"Calibrate", "input voltage?"},
|
// /* (<= 16) Calibrate input voltage */ {"Calibrate", "input
|
||||||
// /* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder screen"},
|
// voltage?"},
|
||||||
|
// /* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder
|
||||||
|
// screen"},
|
||||||
//};
|
//};
|
||||||
|
|
||||||
#ifdef LANG_EN
|
#ifdef LANG_EN
|
||||||
@@ -92,16 +100,20 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
/* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
|
/* (<= 11) Shutdown timeout */ {"Shutdown", "timeout"},
|
||||||
/* (<= 13) Motion sensitivity level */ {"Motion", "sensitivity"},
|
/* (<= 13) Motion sensitivity level */ {"Motion", "sensitivity"},
|
||||||
/* (<= 13) Temperature in F and C */ {"Temperature", "units"},
|
/* (<= 13) Temperature in F and C */ {"Temperature", "units"},
|
||||||
/* (<= 13) Advanced idle display mode enabled */{ "Detailed", "idle screen" },
|
/* (<= 13) Advanced idle display mode enabled */ {"Detailed",
|
||||||
|
"idle screen"},
|
||||||
/* (<= 13) Display rotation mode */ {"Display", "orientation"},
|
/* (<= 13) Display rotation mode */ {"Display", "orientation"},
|
||||||
/* (<= 13) Boost enabled */ {"Boost mode", "enabled"},
|
/* (<= 13) Boost enabled */ {"Boost mode", "enabled"},
|
||||||
/* (<= 9) Boost temperature */ {"Boost", "temp"},
|
/* (<= 9) Boost temperature */ {"Boost", "temp"},
|
||||||
/* (<= 13) Automatic start mode */ {"Auto", "start"},
|
/* (<= 13) Automatic start mode */ {"Auto", "start"},
|
||||||
/* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
|
/* (<= 13) Cooldown blink */ {"Cooldown", "blink"},
|
||||||
/* (<= 16) Temperature calibration enter menu */{ "Calibrate", "temperature?" },
|
/* (<= 16) Temperature calibration enter menu */ {"Calibrate",
|
||||||
|
"temperature?"},
|
||||||
/* (<= 16) Settings reset command */ {"Factory", "Reset?"},
|
/* (<= 16) Settings reset command */ {"Factory", "Reset?"},
|
||||||
/* (<= 16) Calibrate input voltage */{ "Calibrate", "input voltage?" },
|
/* (<= 16) Calibrate input voltage */ {"Calibrate",
|
||||||
/* (<= 13) Advanced soldering screen enabled */{ "Detailed", "solder screen" },
|
"input voltage?"},
|
||||||
|
/* (<= 13) Advanced soldering screen enabled */ {"Detailed",
|
||||||
|
"solder screen"},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -127,7 +139,9 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Показывать детальную информацию при пайке.",
|
/* Advanced soldering screen enabled */"Показывать детальную информацию при пайке.",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Убедитесь, что жало остыло до комнатной температуры, прежде чем продолжать!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Убедитесь, что жало остыло до комнатной температуры, прежде чем "
|
||||||
|
"продолжать!";
|
||||||
const char* UVLOWarningString = "БАТ РАЗР"; // Fixed width 8 chars
|
const char* UVLOWarningString = "БАТ РАЗР"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Хррр"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Хррр"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Ожидание..."; // <=17 chars
|
const char* SleepingAdvancedString = "Ожидание..."; // <=17 chars
|
||||||
@@ -189,7 +203,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Display detailed information while soldering",
|
/* Advanced soldering screen enabled */"Display detailed information while soldering",
|
||||||
};
|
};
|
||||||
|
|
||||||
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!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
||||||
@@ -245,7 +260,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Display detailed information while soldering",
|
/* Advanced soldering screen enabled */"Display detailed information while soldering",
|
||||||
};
|
};
|
||||||
|
|
||||||
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!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
||||||
@@ -301,7 +317,9 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Mostra informazioni dettagliate mentre stai saldando",
|
/* Advanced soldering screen enabled */"Mostra informazioni dettagliate mentre stai saldando",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Assicurati che la punta si trovi a temperatura ambiente prima di continuare!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Assicurati che la punta si trovi a temperatura ambiente prima di "
|
||||||
|
"continuare!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Standby"; // <=17 chars
|
const char* SleepingAdvancedString = "Standby"; // <=17 chars
|
||||||
@@ -357,7 +375,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Afficher des informations detaillees pendant la soudure",
|
/* Advanced soldering screen enabled */"Afficher des informations detaillees pendant la soudure",
|
||||||
};
|
};
|
||||||
|
|
||||||
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!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
||||||
@@ -413,7 +432,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Detaillierte Anzeige im Lötmodus <T=An, F=Aus>",
|
/* Advanced soldering screen enabled */"Detaillierte Anzeige im Lötmodus <T=An, F=Aus>",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Vor dem Fortfahren muss die Lötspitze vollständig abgekühlt sein!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Vor dem Fortfahren muss die Lötspitze vollständig abgekühlt sein!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Ruhemodus..."; // <=17 chars
|
const char* SleepingAdvancedString = "Ruhemodus..."; // <=17 chars
|
||||||
@@ -469,7 +489,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Zobrazenie detailov pocas spajkovania <T=Zap, F=Vyp>",
|
/* Advanced soldering screen enabled */"Zobrazenie detailov pocas spajkovania <T=Zap, F=Vyp>",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Najprv sa prosim uistite, ze hrot ma izbovu teplotu!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Najprv sa prosim uistite, ze hrot ma izbovu teplotu!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Chrr"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Chrr"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Kludovy rezim..."; // <=17 chars
|
const char* SleepingAdvancedString = "Kludovy rezim..."; // <=17 chars
|
||||||
@@ -525,7 +546,8 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Lehimleme yaparken detaylı bilgi göster",
|
/* Advanced soldering screen enabled */"Lehimleme yaparken detaylı bilgi göster",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Uyuyor..."; // <=17 chars
|
const char* SleepingAdvancedString = "Uyuyor..."; // <=17 chars
|
||||||
@@ -581,7 +603,9 @@ const char* SettingsLongNames[16] = {
|
|||||||
/* Advanced soldering screen enabled */"Prikazivanje detaljnih informacija tijekom lemljenja.",
|
/* Advanced soldering screen enabled */"Prikazivanje detaljnih informacija tijekom lemljenja.",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Provjerite da je vršak ohlađen na sobnu temperaturu prije nego što nastavite!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Provjerite da je vršak ohlađen na sobnu temperaturu prije nego što "
|
||||||
|
"nastavite!";
|
||||||
const char* UVLOWarningString = "NAPON!!!"; // Fixed width 8 chars
|
const char* UVLOWarningString = "NAPON!!!"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Spavanje..."; // <=17 chars
|
const char* SleepingAdvancedString = "Spavanje..."; // <=17 chars
|
||||||
@@ -619,25 +643,32 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
const char* SettingsLongNames[16] = {
|
const char* SettingsLongNames[16] = {
|
||||||
/*These are all the help text for all the settings.*/
|
/*These are all the help text for all the settings.*/
|
||||||
/*No requirements on spacing or length*/
|
/*No requirements on spacing or length*/
|
||||||
"Zdroj napajeni. Pri nizsim napeti se odpoji <DC=10V, xS=x*3.3V pro LiPo,LiIon...>", //Power Source
|
"Zdroj napajeni. Pri nizsim napeti se odpoji <DC=10V, xS=x*3.3V pro "
|
||||||
|
"LiPo,LiIon...>", // Power Source
|
||||||
"Teplota v rezimu spanku", // Sleep Temp
|
"Teplota v rezimu spanku", // Sleep Temp
|
||||||
"Cas do rezimu spanku <Minut/Sekund>", // Sleep Timeout
|
"Cas do rezimu spanku <Minut/Sekund>", // Sleep Timeout
|
||||||
"Cas do automatickeho vypnuti <Minut>", // Shutdown Time
|
"Cas do automatickeho vypnuti <Minut>", // Shutdown Time
|
||||||
"Citlivost detekce pohybu <0=Vyp, 1=Min, ... 9=Max>", // Motion Sensitivity
|
"Citlivost detekce pohybu <0=Vyp, 1=Min, ... 9=Max>", // Motion Sensitivity
|
||||||
"Jednotky mereni teploty <C=Celsius, F=Fahrenheit>", // Temp Unit
|
"Jednotky mereni teploty <C=Celsius, F=Fahrenheit>", // Temp Unit
|
||||||
"Zobrazit podrobnosti na vychozi obrazovce <Z=Zap, V=Vyp>",//Detailed Information
|
"Zobrazit podrobnosti na vychozi obrazovce <Z=Zap, V=Vyp>", // Detailed
|
||||||
|
// Information
|
||||||
"Otoceni displaye <A=Auto, L=Levak, P=Pravak>", // Orientation
|
"Otoceni displaye <A=Auto, L=Levak, P=Pravak>", // Orientation
|
||||||
"Povolit boost drzenim leveho tlacitka pri pajeni <Z=Zap, V=Vyp>",//Boost enable
|
"Povolit boost drzenim leveho tlacitka pri pajeni <Z=Zap, V=Vyp>", // Boost
|
||||||
|
// enable
|
||||||
"Teplota pri boostu", // Boost Temp
|
"Teplota pri boostu", // Boost Temp
|
||||||
"Pri startu ihned nahrivat hrot <Z=Zap, V=Vyp, S=Rezim spanku>",//Auto start
|
"Pri startu ihned nahrivat hrot <Z=Zap, V=Vyp, S=Rezim spanku>", // Auto
|
||||||
"Blikani teploty pri chladnuti, dokud je hrot horky <Z=Zap, V=Vyp>",//Cooling Blink
|
// start
|
||||||
|
"Blikani teploty pri chladnuti, dokud je hrot horky <Z=Zap, V=Vyp>", // Cooling
|
||||||
|
// Blink
|
||||||
"Kalibrovat mereni teploty", // Calibrate Tip
|
"Kalibrovat mereni teploty", // Calibrate Tip
|
||||||
"Obnovit tovarni nastaveni", // Reset Settings
|
"Obnovit tovarni nastaveni", // Reset Settings
|
||||||
"Kalibrovat vstupni napeti. Tlacitky upravte, podrzenim potvrdte.",//VIN Cal
|
"Kalibrovat vstupni napeti. Tlacitky upravte, podrzenim potvrdte.", // VIN
|
||||||
|
// Cal
|
||||||
"Zobrazit podrobnosti pri pajeni <Z=Zap, V=Vyp>", // ADV SLD
|
"Zobrazit podrobnosti pri pajeni <Z=Zap, V=Vyp>", // ADV SLD
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Ujistete se, ze hrot ma pokojovou teplotu! "; //ending space needed
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Ujistete se, ze hrot ma pokojovou teplotu! "; // ending space needed
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzz "; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Rezim spanku..."; // <=17 chars
|
const char* SleepingAdvancedString = "Rezim spanku..."; // <=17 chars
|
||||||
@@ -656,44 +687,58 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
/* (<= 9) Sleep temperature */ {"Teplota v", "r. spanku"},
|
/* (<= 9) Sleep temperature */ {"Teplota v", "r. spanku"},
|
||||||
/* (<= 9) Sleep timeout */ {"Cas do", "r. spanku"},
|
/* (<= 9) Sleep timeout */ {"Cas do", "r. spanku"},
|
||||||
/* (<= 11) Shutdown timeout */ {"Cas do", "vypnuti"},
|
/* (<= 11) Shutdown timeout */ {"Cas do", "vypnuti"},
|
||||||
/* (<= 13) Motion sensitivity level */ {"Citlivost", "det. pohybu"},
|
/* (<= 13) Motion sensitivity level */ {"Citlivost",
|
||||||
|
"det. pohybu"},
|
||||||
/* (<= 13) Temperature in F and C */ {"Jednotky", "teploty"},
|
/* (<= 13) Temperature in F and C */ {"Jednotky", "teploty"},
|
||||||
/* (<= 13) Advanced idle display mode enabled */ {"Podrobnosti", "na vych. obr."},
|
/* (<= 13) Advanced idle display mode enabled */ {"Podrobnosti",
|
||||||
|
"na vych. obr."},
|
||||||
/* (<= 13) Display rotation mode */ {"Otoceni", "obrazovky"},
|
/* (<= 13) Display rotation mode */ {"Otoceni", "obrazovky"},
|
||||||
/* (<= 13) Boost enabled */ {"Povolit", "boost"},
|
/* (<= 13) Boost enabled */ {"Povolit", "boost"},
|
||||||
/* (<= 9) Boost temperature */ {"Teplota v", "r. boost"},
|
/* (<= 9) Boost temperature */ {"Teplota v", "r. boost"},
|
||||||
/* (<= 13) Automatic start mode */ {"Auto", "start"},
|
/* (<= 13) Automatic start mode */ {"Auto", "start"},
|
||||||
/* (<= 13) Cooldown blink */ {"Blikani pri", "chladnuti"},
|
/* (<= 13) Cooldown blink */ {"Blikani pri",
|
||||||
|
"chladnuti"},
|
||||||
/* (<= 16) Temperature calibration enter menu */ {"Kalibrovat", "teplotu?"},
|
/* (<= 16) Temperature calibration enter menu */ {"Kalibrovat", "teplotu?"},
|
||||||
/* (<= 16) Settings reset command */ {"Tovarni", "nastaveni?"},
|
/* (<= 16) Settings reset command */ {"Tovarni", "nastaveni?"},
|
||||||
/* (<= 16) Calibrate input voltage */ {"Kalibrovat", "vstupni napeti?"},
|
/* (<= 16) Calibrate input voltage */ {"Kalibrovat",
|
||||||
/* (<= 13) Advanced soldering screen enabled */ {"Podrobnosti", "pri pajeni"},
|
"vstupni napeti?"},
|
||||||
|
/* (<= 13) Advanced soldering screen enabled */ {"Podrobnosti",
|
||||||
|
"pri pajeni"},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LANG_HUN
|
#ifdef LANG_HUN
|
||||||
const char* SettingsLongNames[16] = {
|
const char* SettingsLongNames[16] =
|
||||||
|
{
|
||||||
/*These are all the help text for all the settings.*/
|
/*These are all the help text for all the settings.*/
|
||||||
/*No requirements on spacing or length*/
|
/*No requirements on spacing or length*/
|
||||||
"Áramforrás. Beállítja a lekapcsolási feszültséget. <DC 10V> <S 3.3V cellánként>", //Power Source
|
"Áramforrás. Beállítja a lekapcsolási feszültséget. <DC 10V> <S 3.3V "
|
||||||
|
"cellánként>", // Power Source
|
||||||
"Alvási hőmérséklet <C>", // Sleep Temp
|
"Alvási hőmérséklet <C>", // Sleep Temp
|
||||||
"Elalvási időzítő <Perc/Másodperc>", // Sleep Timeout
|
"Elalvási időzítő <Perc/Másodperc>", // Sleep Timeout
|
||||||
"Kikapcsolási időzítő <Minutes>", // Shutdown Time
|
"Kikapcsolási időzítő <Minutes>", // Shutdown Time
|
||||||
"Mozgás érzékenység beállítása. <0.Ki 1.kevésbé érzékeny 9.legérzékenyebb>",//Motion Sensitivity
|
"Mozgás érzékenység beállítása. <0.Ki 1.kevésbé érzékeny "
|
||||||
|
"9.legérzékenyebb>", // Motion Sensitivity
|
||||||
"Hőmérsékleti egység <C=Celsius F=Fahrenheit>", // Temp Unit
|
"Hőmérsékleti egység <C=Celsius F=Fahrenheit>", // Temp Unit
|
||||||
"Részletes információ megjelenítése kisebb betűméretben a készenléti képernyőn.",//Detailed Information
|
"Részletes információ megjelenítése kisebb betűméretben a készenléti "
|
||||||
|
"képernyőn.", // Detailed Information
|
||||||
"Megjelenítési tájolás <A. Automatikus L. Balkezes R. Jobbkezes>", // Orientation
|
"Megjelenítési tájolás <A. Automatikus L. Balkezes R. Jobbkezes>", // Orientation
|
||||||
"Elülső gombbal lépjen boost módba, 450C forrasztás közben",//Boost enable
|
"Elülső gombbal lépjen boost módba, 450C forrasztás közben", // Boost
|
||||||
|
// enable
|
||||||
"Hőmérséklet \"boost\" módban", // Boost Temp
|
"Hőmérséklet \"boost\" módban", // Boost Temp
|
||||||
"Bekapcsolás után automatikusan lépjen forrasztás módba. T=Forrasztás, S=Alvó mód,F=Ki",//Auto start
|
"Bekapcsolás után automatikusan lépjen forrasztás módba. T=Forrasztás, "
|
||||||
"Villogjon a hőmérséklet hűlés közben, amíg a hegy forró.",//Cooling Blink
|
"S=Alvó mód,F=Ki", // Auto start
|
||||||
|
"Villogjon a hőmérséklet hűlés közben, amíg a hegy forró.", // Cooling
|
||||||
|
// Blink
|
||||||
"Hegy hőmérsékletének kalibrálása", // Calibrate Tip
|
"Hegy hőmérsékletének kalibrálása", // Calibrate Tip
|
||||||
"Beállítások alaphelyzetbe állítása", // Reset Settings
|
"Beállítások alaphelyzetbe állítása", // Reset Settings
|
||||||
"A bemeneti feszültség kalibrálása. Röviden megnyomva állítsa be, hosszan nyomja meg a kilépéshez.",//VIN Cal
|
"A bemeneti feszültség kalibrálása. Röviden megnyomva állítsa be, "
|
||||||
|
"hosszan nyomja meg a kilépéshez.", // VIN Cal
|
||||||
"Részletes információk megjelenítése forrasztás közben", // ADV SLD
|
"Részletes információk megjelenítése forrasztás közben", // ADV SLD
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Folytatás előtt győződj meg róla, hogy a hegy szobahőmérsékletű!";
|
const char* SettingsCalibrationWarning =
|
||||||
|
"Folytatás előtt győződj meg róla, hogy a hegy szobahőmérsékletű!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Alvás..."; // <=17 chars
|
const char* SleepingAdvancedString = "Alvás..."; // <=17 chars
|
||||||
@@ -727,79 +772,27 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LANG_TR
|
|
||||||
const char* SettingsLongNames[16] = {
|
|
||||||
/*These are all the help text for all the settings.*/
|
|
||||||
/*No requirements on spacing or length*/
|
|
||||||
/* Power source (DC or batt) */"Güç Kaynağı. kesim geriliminı ayarlar. <DC 10V> <S 3.3V hücre başına>", //Power Source
|
|
||||||
/* Sleep temperature */"Uyku Sıcaklığı <C>",//Sleep Temp
|
|
||||||
/* Sleep timeout */"Uyku Zaman Aşımı <Dakika/Saniye>",//Sleep Timeout
|
|
||||||
/* Shutdown timeout */"Kapatma Zaman Aşımı <Dakika>",//Shutdown Time
|
|
||||||
/* Motion sensitivity level */"Hareket Hassasiyeti <0.Kapalı 1.En az duyarlı 9.En duyarlı>",//Motion Sensitivity
|
|
||||||
/* Temperature in F and C */"Sıcaklık Ünitesi <C=Celsius F=Fahrenheit>",//Temp Unit
|
|
||||||
/* Advanced idle display mode enabled */"Boş ekranda ayrıntılı bilgileri daha küçük bir yazı tipi ile göster.",//Detailed Information
|
|
||||||
/* Display rotation mode */"Görüntü Yönlendirme <A. Otomatik L. Solak R. Sağlak>",//Orientation
|
|
||||||
/* Boost enabled */"Lehimleme yaparken ön tuşa basmak Boost moduna sokar(450C)",//Boost enable
|
|
||||||
/* Boost temperature */"\"boost\" Modu Derecesi",//Boost Temp
|
|
||||||
/* Automatic start mode */"Güç verildiğinde otomatik olarak lehimleme modunda başlat. T=Lehimleme Modu, S= Uyku Modu,F=Kapalı",//Auto start
|
|
||||||
/* Cooldown blink */"Soğutma ekranında uç hala sıcakken derece yanıp sönsün.",//Cooling Blink
|
|
||||||
/* Temperature calibration enter menu */"Ucu kalibre et.",//Calibrate Tip
|
|
||||||
/* Settings reset command */"Bütün ayarları sıfırla",//Reset Settings
|
|
||||||
/* Calibrate input voltage */"VIN Kalibrasyonu. Düğmeler ayarlar, çıkmak için uzun bas.",//VIN Cal
|
|
||||||
/* Advanced soldering screen enabled */"Lehimleme yaparken detaylı bilgi göster",//ADV SLD
|
|
||||||
};
|
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning = "Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!";
|
|
||||||
const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars
|
|
||||||
const char* SleepingSimpleString = "Zzzz";// Must be <= 4 chars
|
|
||||||
const char* SleepingAdvancedString = "Uyuyor...";// <=17 chars
|
|
||||||
const char* WarningSimpleString = "HOT!";//Must be <= 4 chars
|
|
||||||
const char* WarningAdvancedString = "UYARI! UÇ SICAK!";
|
|
||||||
|
|
||||||
const char SettingTrueChar = 'T';
|
|
||||||
const char SettingFalseChar = 'F';
|
|
||||||
const char SettingRightChar = 'R';
|
|
||||||
const char SettingLeftChar = 'L';
|
|
||||||
const char SettingAutoChar = 'A';
|
|
||||||
|
|
||||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
|
||||||
const char* SettingsShortNames[16][2] = {
|
|
||||||
/* (<= 5) Power source (DC or batt) */{"PWRSC"},
|
|
||||||
/* (<= 4) Sleep temperature */{"STMP"},
|
|
||||||
/* (<= 4) Sleep timeout */{"STME"},
|
|
||||||
/* (<= 5) Shutdown timeout */{"SHTME"},
|
|
||||||
/* (<= 6) Motion sensitivity level */{"MSENSE"},
|
|
||||||
/* (<= 6) Temperature in F and C */{"TMPUNT"},
|
|
||||||
/* (<= 6) Advanced idle display mode enabled */{"ADVIDL"},
|
|
||||||
/* (<= 6) Display rotation mode */{"DSPROT"},
|
|
||||||
/* (<= 6) Boost enabled */{"BOOST"},
|
|
||||||
/* (<= 4) Boost temperature */{"BTMP"},
|
|
||||||
/* (<= 6) Automatic start mode */{"ASTART"},
|
|
||||||
/* (<= 6) Cooldown blink */{"CLBLNK"},
|
|
||||||
/* (<= 8) Temperature calibration enter menu */{"TMP CAL?"},
|
|
||||||
/* (<= 8) Settings reset command */{"RESET?"},
|
|
||||||
/* (<= 8) Calibrate input voltage */{"CAL VIN?"},
|
|
||||||
/* (<= 6) Advanced soldering screen enabled */{"ADVSLD"},
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LANG_DK
|
#ifdef LANG_DK
|
||||||
const char* SettingsLongNames[16] =
|
const char* SettingsLongNames[16] = {
|
||||||
{
|
|
||||||
/*These are all the help text for all the settings.*/
|
/*These are all the help text for all the settings.*/
|
||||||
/*No requirements on spacing or length*/
|
/*No requirements on spacing or length*/
|
||||||
"Strømforsyning. Indstil Cutoff Spændingen. <DC 10V <S 3.3V per cell", // Power Source
|
"Strømforsyning. Indstil Cutoff Spændingen. <DC 10V <S 3.3V per cell", // Power Source
|
||||||
"Dvale Temperatur <C", // Sleep Temp
|
"Dvale Temperatur <C", // Sleep Temp
|
||||||
"Dvale Timeout <Minutter/Sekunder", // Sleep Timeout
|
"Dvale Timeout <Minutter/Sekunder", // Sleep Timeout
|
||||||
"sluknings Timeout <Minutter", // Shutdown Time
|
"sluknings Timeout <Minutter", // Shutdown Time
|
||||||
"Bevægelsesfølsomhed <0.Slukket 1.Mindst følsom 9.Mest følsom",//Motion Sensitivity
|
"Bevægelsesfølsomhed <0.Slukket 1.Mindst følsom 9.Mest følsom", // Motion
|
||||||
|
// Sensitivity
|
||||||
"Temperatur Enhed <C=Celsius F=Fahrenheit", // Temp Unit
|
"Temperatur Enhed <C=Celsius F=Fahrenheit", // Temp Unit
|
||||||
"Vis detialieret information med en mindre skriftstørrelse på standby skærmen.",//Detailed Information
|
"Vis detialieret information med en mindre skriftstørrelse på standby "
|
||||||
|
"skærmen.", // Detailed Information
|
||||||
"Skærm Orientering <A. Automatisk V. Venstre Håndet H. Højre Håndet", // Orientation
|
"Skærm Orientering <A. Automatisk V. Venstre Håndet H. Højre Håndet", // Orientation
|
||||||
"Ved tryk på front knap Aktiveres boost-funktionen, 450C tilstand når der loddes",//Boost enable
|
"Ved tryk på front knap Aktiveres boost-funktionen, 450C tilstand når der "
|
||||||
|
"loddes", // Boost enable
|
||||||
"Temperatur i \"boost\" mode", // Boost Temp
|
"Temperatur i \"boost\" mode", // Boost Temp
|
||||||
"Start automatisk med lodning når strøm sættes til. L=Lodning, D= Dvale tilstand,S=Slukket",//Auto start
|
"Start automatisk med lodning når strøm sættes til. L=Lodning, D= Dvale "
|
||||||
"Blink temperaturen på skærmen, mens spidsen stadig er varm.",//Cooling Blink
|
"tilstand,S=Slukket", // Auto start
|
||||||
|
"Blink temperaturen på skærmen, mens spidsen stadig er varm.", // Cooling
|
||||||
|
// Blink
|
||||||
"kalibrere spids temperatur.", // Calibrate Tip
|
"kalibrere spids temperatur.", // Calibrate Tip
|
||||||
"Gendan alle indstillinger", // Reset Settings
|
"Gendan alle indstillinger", // Reset Settings
|
||||||
"VIN kalibrering. Knapperne justere, Lang tryk for at gå ud", // VIN Cal
|
"VIN kalibrering. Knapperne justere, Lang tryk for at gå ud", // VIN Cal
|
||||||
@@ -841,30 +834,41 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef LANG_PL
|
#ifdef LANG_PL
|
||||||
const char* SettingsLongNames[16] =
|
const char*
|
||||||
|
SettingsLongNames[16] =
|
||||||
{
|
{
|
||||||
/*These are all the help text for all the settings.*/
|
/*These are all the help text for all the settings.*/
|
||||||
/*No requirements on spacing or length*/
|
/*No requirements on spacing or length*/
|
||||||
"Źródło zasilania. Ustaw napięcie odcięcia. <DC 10V> <S 3.3V dla ogniw Li>", //Power Source
|
"Źródło zasilania. Ustaw napięcie odcięcia. <DC 10V> <S 3.3V dla "
|
||||||
|
"ogniw Li>", // Power Source
|
||||||
"Temperatura uśpienia <°C>", // Sleep Temp
|
"Temperatura uśpienia <°C>", // Sleep Temp
|
||||||
"Czas uśpienia <Minuty/Sekundy>", // Sleep Timeout
|
"Czas uśpienia <Minuty/Sekundy>", // Sleep Timeout
|
||||||
"Czas wyłączenia <Minuty>", // Shutdown Time
|
"Czas wyłączenia <Minuty>", // Shutdown Time
|
||||||
"Czułość ruchu <0.Wyłączona 1.minimalna 9.maksymalna>",//Motion Sensitivity
|
"Czułość ruchu <0.Wyłączona 1.minimalna 9.maksymalna>", // Motion
|
||||||
|
// Sensitivity
|
||||||
"Jednostka temperatury <C=Celsius F=Fahrenheit>", // Temp Unit
|
"Jednostka temperatury <C=Celsius F=Fahrenheit>", // Temp Unit
|
||||||
"Wyświetla szczegółowe informacje za pomocą mniejszej czcionki na ekranie bezczynnośći <T = wł., N = wył.>",//Detailed Information
|
"Wyświetla szczegółowe informacje za pomocą mniejszej czcionki na "
|
||||||
"Orientacja wyświetlacza <A. Automatyczna L. Leworęczna P. Praworęczna>",//Orientation
|
"ekranie bezczynnośći <T = wł., N = wył.>", // Detailed Information
|
||||||
"Użyj przycisku przedniego w celu zwiększenia temperatury <T = wł., N = wył.>",//Boost enable
|
"Orientacja wyświetlacza <A. Automatyczna L. Leworęczna P. "
|
||||||
|
"Praworęczna>", // Orientation
|
||||||
|
"Użyj przycisku przedniego w celu zwiększenia temperatury <T = "
|
||||||
|
"wł., N = wył.>", // Boost enable
|
||||||
"Temperatura w trybie \"boost\" ", // Boost Temp
|
"Temperatura w trybie \"boost\" ", // Boost Temp
|
||||||
"Automatyczne uruchamianie trybu lutowania po włączeniu zasilania. T=Lutowanie, S= Tryb Uspienia ,N=Wyłącz",//Auto start
|
"Automatyczne uruchamianie trybu lutowania po włączeniu zasilania. "
|
||||||
"Temperatura na ekranie miga, gdy grot jest jeszcze gorący. <T = wł., N = wył.>",//Cooling Blink
|
"T=Lutowanie, S= Tryb Uspienia ,N=Wyłącz", // Auto start
|
||||||
|
"Temperatura na ekranie miga, gdy grot jest jeszcze gorący. <T = "
|
||||||
|
"wł., N = wył.>", // Cooling Blink
|
||||||
"Kalibracja temperatury grota lutownicy", // Calibrate Tip
|
"Kalibracja temperatury grota lutownicy", // Calibrate Tip
|
||||||
"Zresetuj wszystkie ustawienia", // Reset Settings
|
"Zresetuj wszystkie ustawienia", // Reset Settings
|
||||||
"Kalibracja napięcia wejściowego. Krótkie naciśnięcie, aby ustawić, długie naciśnięcie, aby wyjść.",//VIN Cal
|
"Kalibracja napięcia wejściowego. Krótkie naciśnięcie, aby "
|
||||||
"Wyświetl szczegółowe informacje podczas lutowania <T = wł., N = wył.>",//ADV SLD
|
"ustawić, długie naciśnięcie, aby wyjść.", // VIN Cal
|
||||||
|
"Wyświetl szczegółowe informacje podczas lutowania <T = wł., N = "
|
||||||
|
"wył.>", // ADV SLD
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* SettingsCalibrationWarning =
|
const char* SettingsCalibrationWarning =
|
||||||
"Przed kontynuowaniem upewnij się, że końcówka osiągnela temperature pokojowa!";
|
"Przed kontynuowaniem upewnij się, że końcówka osiągnela temperature "
|
||||||
|
"pokojowa!";
|
||||||
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
const char* UVLOWarningString = "LOW VOLT"; // Fixed width 8 chars
|
||||||
const char* SleepingSimpleString = "Zzz!"; // Must be <= 4 chars
|
const char* SleepingSimpleString = "Zzz!"; // Must be <= 4 chars
|
||||||
const char* SleepingAdvancedString = "Uspienie..."; // <=17 chars
|
const char* SleepingAdvancedString = "Uspienie..."; // <=17 chars
|
||||||
@@ -894,5 +898,6 @@ const char* SettingsShortNames[16][2] = {
|
|||||||
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
|
/* (<= 8) Temperature calibration enter menu */ {"TMP CAL?"},
|
||||||
/* (<= 8) Settings reset command */ {"RESET?"},
|
/* (<= 8) Settings reset command */ {"RESET?"},
|
||||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||||
/* (<= 6) Advanced soldering screen enabled */{"ADVSLD"},};
|
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "string.h"
|
|
||||||
#include "hardware.h"
|
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
#include "hardware.h"
|
||||||
|
#include "string.h"
|
||||||
static void settings_setInputVRange(void);
|
static void settings_setInputVRange(void);
|
||||||
static void settings_displayInputVRange(void);
|
static void settings_displayInputVRange(void);
|
||||||
static void settings_setSleepTemp(void);
|
static void settings_setSleepTemp(void);
|
||||||
@@ -44,27 +44,59 @@ static void settings_setCalibrateVIN(void);
|
|||||||
static void settings_displayCalibrateVIN(void);
|
static void settings_displayCalibrateVIN(void);
|
||||||
|
|
||||||
bool settingsResetRequest = false;
|
bool settingsResetRequest = false;
|
||||||
const menuitem settingsMenu[] = { /*Struct used for all settings options in the settings menu*/
|
const menuitem settingsMenu[] = {
|
||||||
{ (const char*) SettingsLongNames[0], { settings_setInputVRange }, { settings_displayInputVRange } },/*Voltage input*/
|
/*Struct used for all settings options in the settings menu*/
|
||||||
{ (const char*) SettingsLongNames[1], { settings_setSleepTemp }, { settings_displaySleepTemp } }, /*Sleep Temp*/
|
{(const char*)SettingsLongNames[0],
|
||||||
{ (const char*) SettingsLongNames[2], { settings_setSleepTime }, { settings_displaySleepTime } }, /*Sleep Time*/
|
{settings_setInputVRange},
|
||||||
{ (const char*) SettingsLongNames[3], { settings_setShutdownTime }, { settings_displayShutdownTime } }, /*Shutdown Time*/
|
{settings_displayInputVRange}}, /*Voltage input*/
|
||||||
{ (const char*) SettingsLongNames[4], { settings_setSensitivity }, { settings_displaySensitivity } },/* Motion Sensitivity*/
|
{(const char*)SettingsLongNames[1],
|
||||||
{ (const char*) SettingsLongNames[5], { settings_setTempF }, { settings_displayTempF } },/* Motion Sensitivity*/
|
{settings_setSleepTemp},
|
||||||
{ (const char*) SettingsLongNames[6], { settings_setAdvancedIDLEScreens }, { settings_displayAdvancedIDLEScreens } },/* Advanced screens*/
|
{settings_displaySleepTemp}}, /*Sleep Temp*/
|
||||||
{ (const char*) SettingsLongNames[15], { settings_setAdvancedSolderingScreens }, { settings_displayAdvancedSolderingScreens } },/* Advanced screens*/
|
{(const char*)SettingsLongNames[2],
|
||||||
{ (const char*) SettingsLongNames[7], { settings_setDisplayRotation }, { settings_displayDisplayRotation } }, /*Display Rotation*/
|
{settings_setSleepTime},
|
||||||
{ (const char*) SettingsLongNames[8], { settings_setBoostModeEnabled }, { settings_displayBoostModeEnabled } }, /*Enable Boost*/
|
{settings_displaySleepTime}}, /*Sleep Time*/
|
||||||
{ (const char*) SettingsLongNames[9], { settings_setBoostTemp }, { settings_displayBoostTemp } }, /*Boost Temp*/
|
{(const char*)SettingsLongNames[3],
|
||||||
{ (const char*) SettingsLongNames[10], { settings_setAutomaticStartMode }, { settings_displayAutomaticStartMode } },/*Auto start*/
|
{settings_setShutdownTime},
|
||||||
{ (const char*) SettingsLongNames[11], { settings_setCoolingBlinkEnabled }, { settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
{settings_displayShutdownTime}}, /*Shutdown Time*/
|
||||||
{ (const char*) SettingsLongNames[12], { settings_setCalibrate }, { settings_displayCalibrate } }, /*Calibrate tip*/
|
{(const char*)SettingsLongNames[4],
|
||||||
{ (const char*) SettingsLongNames[13], { settings_setResetSettings }, { settings_displayResetSettings } }, /*Resets settings*/
|
{settings_setSensitivity},
|
||||||
{ (const char*) SettingsLongNames[14], { settings_setCalibrateVIN }, { settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
{settings_displaySensitivity}}, /* Motion Sensitivity*/
|
||||||
|
{(const char*)SettingsLongNames[5],
|
||||||
|
{settings_setTempF},
|
||||||
|
{settings_displayTempF}}, /* Motion Sensitivity*/
|
||||||
|
{(const char*)SettingsLongNames[6],
|
||||||
|
{settings_setAdvancedIDLEScreens},
|
||||||
|
{settings_displayAdvancedIDLEScreens}}, /* Advanced screens*/
|
||||||
|
{(const char*)SettingsLongNames[15],
|
||||||
|
{settings_setAdvancedSolderingScreens},
|
||||||
|
{settings_displayAdvancedSolderingScreens}}, /* Advanced screens*/
|
||||||
|
{(const char*)SettingsLongNames[7],
|
||||||
|
{settings_setDisplayRotation},
|
||||||
|
{settings_displayDisplayRotation}}, /*Display Rotation*/
|
||||||
|
{(const char*)SettingsLongNames[8],
|
||||||
|
{settings_setBoostModeEnabled},
|
||||||
|
{settings_displayBoostModeEnabled}}, /*Enable Boost*/
|
||||||
|
{(const char*)SettingsLongNames[9],
|
||||||
|
{settings_setBoostTemp},
|
||||||
|
{settings_displayBoostTemp}}, /*Boost Temp*/
|
||||||
|
{(const char*)SettingsLongNames[10],
|
||||||
|
{settings_setAutomaticStartMode},
|
||||||
|
{settings_displayAutomaticStartMode}}, /*Auto start*/
|
||||||
|
{(const char*)SettingsLongNames[11],
|
||||||
|
{settings_setCoolingBlinkEnabled},
|
||||||
|
{settings_displayCoolingBlinkEnabled}}, /*Cooling blink warning*/
|
||||||
|
{(const char*)SettingsLongNames[12],
|
||||||
|
{settings_setCalibrate},
|
||||||
|
{settings_displayCalibrate}}, /*Calibrate tip*/
|
||||||
|
{(const char*)SettingsLongNames[13],
|
||||||
|
{settings_setResetSettings},
|
||||||
|
{settings_displayResetSettings}}, /*Resets settings*/
|
||||||
|
{(const char*)SettingsLongNames[14],
|
||||||
|
{settings_setCalibrateVIN},
|
||||||
|
{settings_displayCalibrateVIN}}, /*Voltage input cal*/
|
||||||
{NULL, {NULL}, {NULL}} // end of menu marker. DO NOT REMOVE
|
{NULL, {NULL}, {NULL}} // end of menu marker. DO NOT REMOVE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
|
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
|
||||||
lcd.setFont(0);
|
lcd.setFont(0);
|
||||||
lcd.setCharCursor(0, 0);
|
lcd.setCharCursor(0, 0);
|
||||||
@@ -83,14 +115,15 @@ static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
|||||||
* Prints two small lines of short description
|
* Prints two small lines of short description
|
||||||
* and prepares cursor in big font after it.
|
* and prepares cursor in big font after it.
|
||||||
* @param shortDescIndex Index to of short description.
|
* @param shortDescIndex Index to of short description.
|
||||||
* @param cursorCharPosition Custom cursor char position to set after printing description.
|
* @param cursorCharPosition Custom cursor char position to set after printing
|
||||||
|
* description.
|
||||||
*/
|
*/
|
||||||
static void printShortDescription(uint32_t shortDescIndex, uint16_t cursorCharPosition) {
|
static void printShortDescription(uint32_t shortDescIndex,
|
||||||
|
uint16_t cursorCharPosition) {
|
||||||
// print short description (default single line, explicit double line)
|
// print short description (default single line, explicit double line)
|
||||||
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
||||||
printShortDescriptionDoubleLine(shortDescIndex);
|
printShortDescriptionDoubleLine(shortDescIndex);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
printShortDescriptionSingleLine(shortDescIndex);
|
printShortDescriptionSingleLine(shortDescIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +132,6 @@ static void printShortDescription(uint32_t shortDescIndex, uint16_t cursorCharPo
|
|||||||
lcd.setCharCursor(cursorCharPosition, 0);
|
lcd.setCharCursor(cursorCharPosition, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setInputVRange(void) {
|
static void settings_setInputVRange(void) {
|
||||||
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
|
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
|
||||||
}
|
}
|
||||||
@@ -110,17 +142,14 @@ static void settings_displayInputVRange(void) {
|
|||||||
if (systemSettings.cutoutSetting) {
|
if (systemSettings.cutoutSetting) {
|
||||||
lcd.drawChar('0' + 2 + systemSettings.cutoutSetting);
|
lcd.drawChar('0' + 2 + systemSettings.cutoutSetting);
|
||||||
lcd.drawChar('S');
|
lcd.drawChar('S');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lcd.print("DC");
|
lcd.print("DC");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setSleepTemp(void) {
|
static void settings_setSleepTemp(void) {
|
||||||
systemSettings.SleepTemp += 10;
|
systemSettings.SleepTemp += 10;
|
||||||
if (systemSettings.SleepTemp > 300)
|
if (systemSettings.SleepTemp > 300) systemSettings.SleepTemp = 50;
|
||||||
systemSettings.SleepTemp = 50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_displaySleepTemp(void) {
|
static void settings_displaySleepTemp(void) {
|
||||||
@@ -128,7 +157,6 @@ static void settings_displaySleepTemp(void) {
|
|||||||
lcd.printNumber(systemSettings.SleepTemp, 3);
|
lcd.printNumber(systemSettings.SleepTemp, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setSleepTime(void) {
|
static void settings_setSleepTime(void) {
|
||||||
systemSettings.SleepTime++; // Go up 1 minute at a time
|
systemSettings.SleepTime++; // Go up 1 minute at a time
|
||||||
if (systemSettings.SleepTime >= 16) {
|
if (systemSettings.SleepTime >= 16) {
|
||||||
@@ -143,14 +171,12 @@ static void settings_displaySleepTime(void) {
|
|||||||
if (systemSettings.SleepTime < 6) {
|
if (systemSettings.SleepTime < 6) {
|
||||||
lcd.printNumber(systemSettings.SleepTime * 10, 2);
|
lcd.printNumber(systemSettings.SleepTime * 10, 2);
|
||||||
lcd.drawChar('S');
|
lcd.drawChar('S');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
lcd.printNumber(systemSettings.SleepTime - 5, 2);
|
lcd.printNumber(systemSettings.SleepTime - 5, 2);
|
||||||
lcd.drawChar('M');
|
lcd.drawChar('M');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setShutdownTime(void) {
|
static void settings_setShutdownTime(void) {
|
||||||
systemSettings.ShutdownTime++;
|
systemSettings.ShutdownTime++;
|
||||||
if (systemSettings.ShutdownTime > 60) {
|
if (systemSettings.ShutdownTime > 60) {
|
||||||
@@ -163,7 +189,6 @@ static void settings_displayShutdownTime(void) {
|
|||||||
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setTempF(void) {
|
static void settings_setTempF(void) {
|
||||||
systemSettings.temperatureInF = !systemSettings.temperatureInF;
|
systemSettings.temperatureInF = !systemSettings.temperatureInF;
|
||||||
}
|
}
|
||||||
@@ -171,14 +196,9 @@ static void settings_setTempF(void) {
|
|||||||
static void settings_displayTempF(void) {
|
static void settings_displayTempF(void) {
|
||||||
printShortDescription(5, 7);
|
printShortDescription(5, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C');
|
||||||
(systemSettings.temperatureInF)
|
|
||||||
? 'F'
|
|
||||||
: 'C'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setSensitivity(void) {
|
static void settings_setSensitivity(void) {
|
||||||
systemSettings.sensitivity++;
|
systemSettings.sensitivity++;
|
||||||
systemSettings.sensitivity = systemSettings.sensitivity % 10;
|
systemSettings.sensitivity = systemSettings.sensitivity % 10;
|
||||||
@@ -189,7 +209,6 @@ static void settings_displaySensitivity(void) {
|
|||||||
lcd.printNumber(systemSettings.sensitivity, 1);
|
lcd.printNumber(systemSettings.sensitivity, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setAdvancedSolderingScreens(void) {
|
static void settings_setAdvancedSolderingScreens(void) {
|
||||||
systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
|
systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
|
||||||
}
|
}
|
||||||
@@ -197,14 +216,10 @@ static void settings_setAdvancedSolderingScreens(void) {
|
|||||||
static void settings_displayAdvancedSolderingScreens(void) {
|
static void settings_displayAdvancedSolderingScreens(void) {
|
||||||
printShortDescription(15, 7);
|
printShortDescription(15, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.detailedSoldering) ? SettingTrueChar
|
||||||
(systemSettings.detailedSoldering)
|
: SettingFalseChar);
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setAdvancedIDLEScreens(void) {
|
static void settings_setAdvancedIDLEScreens(void) {
|
||||||
systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
|
systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
|
||||||
}
|
}
|
||||||
@@ -212,14 +227,10 @@ static void settings_setAdvancedIDLEScreens(void) {
|
|||||||
static void settings_displayAdvancedIDLEScreens(void) {
|
static void settings_displayAdvancedIDLEScreens(void) {
|
||||||
printShortDescription(6, 7);
|
printShortDescription(6, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.detailedIDLE) ? SettingTrueChar
|
||||||
(systemSettings.detailedIDLE)
|
: SettingFalseChar);
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setDisplayRotation(void) {
|
static void settings_setDisplayRotation(void) {
|
||||||
systemSettings.OrientationMode++;
|
systemSettings.OrientationMode++;
|
||||||
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
||||||
@@ -238,10 +249,12 @@ static void settings_displayDisplayRotation(void) {
|
|||||||
case 2:
|
case 2:
|
||||||
lcd.drawChar(SettingAutoChar);
|
lcd.drawChar(SettingAutoChar);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
lcd.drawChar(SettingRightChar);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setBoostModeEnabled(void) {
|
static void settings_setBoostModeEnabled(void) {
|
||||||
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
|
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
|
||||||
}
|
}
|
||||||
@@ -249,22 +262,17 @@ static void settings_setBoostModeEnabled(void) {
|
|||||||
static void settings_displayBoostModeEnabled(void) {
|
static void settings_displayBoostModeEnabled(void) {
|
||||||
printShortDescription(8, 7);
|
printShortDescription(8, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.boostModeEnabled) ? SettingTrueChar
|
||||||
(systemSettings.boostModeEnabled)
|
: SettingFalseChar);
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setBoostTemp(void) {
|
static void settings_setBoostTemp(void) {
|
||||||
systemSettings.BoostTemp += 10; // Go up 10 at a time
|
systemSettings.BoostTemp += 10; // Go up 10 at a time
|
||||||
if (systemSettings.temperatureInF) {
|
if (systemSettings.temperatureInF) {
|
||||||
if (systemSettings.BoostTemp > 850) {
|
if (systemSettings.BoostTemp > 850) {
|
||||||
systemSettings.BoostTemp = 480; // loop back at 250
|
systemSettings.BoostTemp = 480; // loop back at 250
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (systemSettings.BoostTemp > 450) {
|
if (systemSettings.BoostTemp > 450) {
|
||||||
systemSettings.BoostTemp = 250; // loop back at 250
|
systemSettings.BoostTemp = 250; // loop back at 250
|
||||||
}
|
}
|
||||||
@@ -276,7 +284,6 @@ static void settings_displayBoostTemp(void) {
|
|||||||
lcd.printNumber(systemSettings.BoostTemp, 3);
|
lcd.printNumber(systemSettings.BoostTemp, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setAutomaticStartMode(void) {
|
static void settings_setAutomaticStartMode(void) {
|
||||||
systemSettings.autoStartMode++;
|
systemSettings.autoStartMode++;
|
||||||
systemSettings.autoStartMode %= 2;
|
systemSettings.autoStartMode %= 2;
|
||||||
@@ -285,14 +292,10 @@ static void settings_setAutomaticStartMode(void) {
|
|||||||
static void settings_displayAutomaticStartMode(void) {
|
static void settings_displayAutomaticStartMode(void) {
|
||||||
printShortDescription(10, 7);
|
printShortDescription(10, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.autoStartMode) ? SettingTrueChar
|
||||||
(systemSettings.autoStartMode)
|
: SettingFalseChar);
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setCoolingBlinkEnabled(void) {
|
static void settings_setCoolingBlinkEnabled(void) {
|
||||||
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
|
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
|
||||||
}
|
}
|
||||||
@@ -300,14 +303,10 @@ static void settings_setCoolingBlinkEnabled(void) {
|
|||||||
static void settings_displayCoolingBlinkEnabled(void) {
|
static void settings_displayCoolingBlinkEnabled(void) {
|
||||||
printShortDescription(11, 7);
|
printShortDescription(11, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((systemSettings.coolingTempBlink) ? SettingTrueChar
|
||||||
(systemSettings.coolingTempBlink)
|
: SettingFalseChar);
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void settings_setResetSettings(void) {
|
static void settings_setResetSettings(void) {
|
||||||
settingsResetRequest = !settingsResetRequest;
|
settingsResetRequest = !settingsResetRequest;
|
||||||
}
|
}
|
||||||
@@ -315,11 +314,7 @@ static void settings_setResetSettings(void) {
|
|||||||
static void settings_displayResetSettings(void) {
|
static void settings_displayResetSettings(void) {
|
||||||
printShortDescription(13, 7);
|
printShortDescription(13, 7);
|
||||||
|
|
||||||
lcd.drawChar(
|
lcd.drawChar((settingsResetRequest) ? SettingTrueChar : SettingFalseChar);
|
||||||
(settingsResetRequest)
|
|
||||||
? SettingTrueChar
|
|
||||||
: SettingFalseChar
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_setCalibrate(void) {
|
static void settings_setCalibrate(void) {
|
||||||
@@ -333,7 +328,8 @@ static void settings_setCalibrate(void) {
|
|||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int16_t descriptionOffset = (((HAL_GetTick() - descriptionStart) / 150) % maxOffset);
|
int16_t descriptionOffset =
|
||||||
|
(((HAL_GetTick() - descriptionStart) / 150) % maxOffset);
|
||||||
|
|
||||||
lcd.setCursor(12 * (7 - descriptionOffset), 0);
|
lcd.setCursor(12 * (7 - descriptionOffset), 0);
|
||||||
lcd.print(SettingsCalibrationWarning);
|
lcd.print(SettingsCalibrationWarning);
|
||||||
@@ -350,7 +346,8 @@ static void settings_setCalibrate(void) {
|
|||||||
|
|
||||||
setCalibrationOffset(0); // turn off the current offset
|
setCalibrationOffset(0); // turn off the current offset
|
||||||
for (uint8_t i = 0; i < 20; i++) {
|
for (uint8_t i = 0; i < 20; i++) {
|
||||||
getTipRawTemp(1); //cycle through the filter a fair bit to ensure we're stable.
|
getTipRawTemp(1); // cycle through the filter a fair bit to ensure
|
||||||
|
// we're stable.
|
||||||
osDelay(20);
|
osDelay(20);
|
||||||
}
|
}
|
||||||
osDelay(100);
|
osDelay(100);
|
||||||
@@ -358,7 +355,8 @@ static void settings_setCalibrate(void) {
|
|||||||
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
||||||
// We now measure the current reported tip temperature
|
// We now measure the current reported tip temperature
|
||||||
uint16_t handleTempC = getHandleTemperature() / 10;
|
uint16_t handleTempC = getHandleTemperature() / 10;
|
||||||
//We now have an error between these that we want to store as the offset
|
// We now have an error between these that we want to store as the
|
||||||
|
// offset
|
||||||
rawTempC = rawTempC - handleTempC;
|
rawTempC = rawTempC - handleTempC;
|
||||||
systemSettings.CalibrationOffset = rawTempC;
|
systemSettings.CalibrationOffset = rawTempC;
|
||||||
setCalibrationOffset(rawTempC); // store the error
|
setCalibrationOffset(rawTempC); // store the error
|
||||||
@@ -374,6 +372,8 @@ static void settings_setCalibrate(void) {
|
|||||||
|
|
||||||
case BUTTON_NONE:
|
case BUTTON_NONE:
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
@@ -381,10 +381,7 @@ static void settings_setCalibrate(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_displayCalibrate(void) {
|
static void settings_displayCalibrate(void) { printShortDescription(12, 5); }
|
||||||
printShortDescription(12, 5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void settings_setCalibrateVIN(void) {
|
static void settings_setCalibrateVIN(void) {
|
||||||
// Jump to the voltage calibration subscreen
|
// Jump to the voltage calibration subscreen
|
||||||
@@ -416,6 +413,7 @@ static void settings_setCalibrateVIN(void) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case BUTTON_NONE:
|
case BUTTON_NONE:
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,13 +423,10 @@ static void settings_setCalibrateVIN(void) {
|
|||||||
// Cap to sensible values
|
// Cap to sensible values
|
||||||
if (systemSettings.voltageDiv < 90) {
|
if (systemSettings.voltageDiv < 90) {
|
||||||
systemSettings.voltageDiv = 90;
|
systemSettings.voltageDiv = 90;
|
||||||
}
|
} else if (systemSettings.voltageDiv > 130) {
|
||||||
else if (systemSettings.voltageDiv > 130) {
|
|
||||||
systemSettings.voltageDiv = 130;
|
systemSettings.voltageDiv = 130;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_displayCalibrateVIN(void) {
|
static void settings_displayCalibrateVIN(void) { printShortDescription(14, 5); }
|
||||||
printShortDescription(14, 5);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
// By Ben V. Brown - V2.0 of the TS100 firmware
|
// By Ben V. Brown - V2.0 of the TS100 firmware
|
||||||
#include <main.hpp>
|
|
||||||
#include <MMA8652FC.hpp>
|
#include <MMA8652FC.hpp>
|
||||||
#include "stm32f1xx_hal.h"
|
#include <main.hpp>
|
||||||
#include "cmsis_os.h"
|
|
||||||
#include "OLED.hpp"
|
#include "OLED.hpp"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "Translation.h"
|
#include "Translation.h"
|
||||||
#include "string.h"
|
#include "cmsis_os.h"
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
|
#include "stm32f1xx_hal.h"
|
||||||
|
#include "string.h"
|
||||||
|
|
||||||
// C++ objects
|
// C++ objects
|
||||||
OLED lcd(&hi2c1);
|
OLED lcd(&hi2c1);
|
||||||
@@ -35,13 +35,15 @@ void startRotationTask(void const * argument);
|
|||||||
|
|
||||||
// Main inits hardware then hands over to the FreeRTOS kernel
|
// Main inits hardware then hands over to the FreeRTOS kernel
|
||||||
int main(void) {
|
int main(void) {
|
||||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
|
||||||
|
*/
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
Setup_HAL(); // Setup all the HAL objects
|
Setup_HAL(); // Setup all the HAL objects
|
||||||
setTipPWM(0);
|
setTipPWM(0);
|
||||||
lcd.initialize(); // start up the LCD
|
lcd.initialize(); // start up the LCD
|
||||||
lcd.setFont(0); // default to bigger font
|
lcd.setFont(0); // default to bigger font
|
||||||
accel.initalize(); //this sets up the I2C registers and loads up the default settings
|
accel.initalize(); // this sets up the I2C registers and loads up the default
|
||||||
|
// settings
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
restoreSettings(); // load the settings from flash
|
restoreSettings(); // load the settings from flash
|
||||||
setCalibrationOffset(systemSettings.CalibrationOffset);
|
setCalibrationOffset(systemSettings.CalibrationOffset);
|
||||||
@@ -63,8 +65,10 @@ int main(void) {
|
|||||||
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
|
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
|
||||||
|
|
||||||
/* Create the objects*/
|
/* Create the objects*/
|
||||||
rotationChangedSemaphore = xSemaphoreCreateBinary(); // Used to unlock rotation thread
|
rotationChangedSemaphore =
|
||||||
accelDataAvailableSemaphore = xSemaphoreCreateBinary(); // Used to unlock the movement thread
|
xSemaphoreCreateBinary(); // Used to unlock rotation thread
|
||||||
|
accelDataAvailableSemaphore =
|
||||||
|
xSemaphoreCreateBinary(); // Used to unlock the movement thread
|
||||||
/* Start scheduler */
|
/* Start scheduler */
|
||||||
osKernelStart();
|
osKernelStart();
|
||||||
|
|
||||||
@@ -88,7 +92,6 @@ void gui_drawTipTemp() {
|
|||||||
// Temp = systemSettings.SolderingTemp;
|
// Temp = systemSettings.SolderingTemp;
|
||||||
|
|
||||||
lcd.printNumber(Temp, 3); // Draw the tip temp out finally
|
lcd.printNumber(Temp, 3); // Draw the tip temp out finally
|
||||||
|
|
||||||
}
|
}
|
||||||
ButtonState getButtonState() {
|
ButtonState getButtonState() {
|
||||||
/*
|
/*
|
||||||
@@ -96,25 +99,26 @@ ButtonState getButtonState() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the previous state was 00 Then we want to latch the new state if different & update time
|
* If the previous state was 00 Then we want to latch the new state if
|
||||||
* If the previous state was !00 Then we want to search if we trigger long press (buttons still down), or if release we trigger press (downtime>filter)
|
* different & update time
|
||||||
|
* If the previous state was !00 Then we want to search if we trigger long
|
||||||
|
* press (buttons still down), or if release we trigger press
|
||||||
|
* (downtime>filter)
|
||||||
*/
|
*/
|
||||||
static uint8_t previousState = 0;
|
static uint8_t previousState = 0;
|
||||||
static uint32_t previousStateChange = 0;
|
static uint32_t previousStateChange = 0;
|
||||||
const uint16_t timeout = 400;
|
const uint16_t timeout = 400;
|
||||||
uint8_t currentState;
|
uint8_t currentState;
|
||||||
currentState = (
|
currentState =
|
||||||
HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ?
|
(HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET ? 1 : 0)
|
||||||
1 : 0) << 0;
|
<< 0;
|
||||||
currentState |= (
|
currentState |=
|
||||||
HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ?
|
(HAL_GPIO_ReadPin(KEY_B_GPIO_Port, KEY_B_Pin) == GPIO_PIN_RESET ? 1 : 0)
|
||||||
1 : 0) << 1;
|
<< 1;
|
||||||
|
|
||||||
if (currentState)
|
if (currentState) lastButtonTime = HAL_GetTick();
|
||||||
lastButtonTime = HAL_GetTick();
|
|
||||||
if (currentState == previousState) {
|
if (currentState == previousState) {
|
||||||
if (currentState == 0)
|
if (currentState == 0) return BUTTON_NONE;
|
||||||
return BUTTON_NONE;
|
|
||||||
if ((HAL_GetTick() - previousStateChange) > timeout) {
|
if ((HAL_GetTick() - previousStateChange) > timeout) {
|
||||||
// User has been holding the button down
|
// User has been holding the button down
|
||||||
// We want to send a buttong is held message
|
// We want to send a buttong is held message
|
||||||
@@ -134,7 +138,8 @@ ButtonState getButtonState() {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// User has released buttons
|
// User has released buttons
|
||||||
// If they previously had the buttons down we want to check if they were < long hold and trigger a press
|
// If they previously had the buttons down we want to check if they were <
|
||||||
|
// long hold and trigger a press
|
||||||
if ((HAL_GetTick() - previousStateChange) < timeout) {
|
if ((HAL_GetTick() - previousStateChange) < timeout) {
|
||||||
// The user didn't hold the button for long
|
// The user didn't hold the button for long
|
||||||
// So we send button press
|
// So we send button press
|
||||||
@@ -146,7 +151,6 @@ ButtonState getButtonState() {
|
|||||||
else
|
else
|
||||||
retVal = BUTTON_BOTH; // Both being held case
|
retVal = BUTTON_BOTH; // Both being held case
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
previousState = currentState;
|
previousState = currentState;
|
||||||
previousStateChange = HAL_GetTick();
|
previousStateChange = HAL_GetTick();
|
||||||
@@ -177,13 +181,10 @@ static void waitForButtonPressOrTimeout(uint32_t timeout) {
|
|||||||
// Make timeout our exit value
|
// Make timeout our exit value
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ButtonState buttons = getButtonState();
|
ButtonState buttons = getButtonState();
|
||||||
if (buttons)
|
if (buttons) return;
|
||||||
return;
|
if (HAL_GetTick() > timeout) return;
|
||||||
if (HAL_GetTick() > timeout)
|
|
||||||
return;
|
|
||||||
GUIDelay();
|
GUIDelay();
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -198,11 +199,9 @@ static bool checkVoltageForExit() {
|
|||||||
lcd.print("Undervoltage");
|
lcd.print("Undervoltage");
|
||||||
lcd.setCursor(0, 8);
|
lcd.setCursor(0, 8);
|
||||||
lcd.print("Input V: ");
|
lcd.print("Input V: ");
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||||
2);
|
|
||||||
lcd.drawChar('.');
|
lcd.drawChar('.');
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
|
||||||
1);
|
|
||||||
lcd.print("V");
|
lcd.print("V");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -222,19 +221,15 @@ static void gui_drawBatteryIcon() {
|
|||||||
// User is on a lithium battery
|
// User is on a lithium battery
|
||||||
// we need to calculate which of the 10 levels they are on
|
// we need to calculate which of the 10 levels they are on
|
||||||
uint8_t cellCount = systemSettings.cutoutSetting + 2;
|
uint8_t cellCount = systemSettings.cutoutSetting + 2;
|
||||||
uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv)
|
uint16_t cellV = getInputVoltageX10(systemSettings.voltageDiv) / cellCount;
|
||||||
/ cellCount;
|
|
||||||
// Should give us approx cell voltage X10
|
// Should give us approx cell voltage X10
|
||||||
// Range is 42 -> 33 = 9 steps therefore we will use battery 1-10
|
// Range is 42 -> 33 = 9 steps therefore we will use battery 1-10
|
||||||
if (cellV < 33)
|
if (cellV < 33) cellV = 33;
|
||||||
cellV = 33;
|
|
||||||
cellV -= 33; // Should leave us a number of 0-9
|
cellV -= 33; // Should leave us a number of 0-9
|
||||||
if (cellV > 9)
|
if (cellV > 9) cellV = 9;
|
||||||
cellV = 9;
|
|
||||||
lcd.drawBattery(cellV + 1);
|
lcd.drawBattery(cellV + 1);
|
||||||
} else
|
} else
|
||||||
lcd.drawSymbol(16); // Draw the DC Logo
|
lcd.drawSymbol(16); // Draw the DC Logo
|
||||||
|
|
||||||
}
|
}
|
||||||
static void gui_solderingTempAdjust() {
|
static void gui_solderingTempAdjust() {
|
||||||
uint32_t lastChange = HAL_GetTick();
|
uint32_t lastChange = HAL_GetTick();
|
||||||
@@ -244,8 +239,7 @@ static void gui_solderingTempAdjust() {
|
|||||||
lcd.clearScreen();
|
lcd.clearScreen();
|
||||||
lcd.setFont(0);
|
lcd.setFont(0);
|
||||||
ButtonState buttons = getButtonState();
|
ButtonState buttons = getButtonState();
|
||||||
if (buttons)
|
if (buttons) lastChange = HAL_GetTick();
|
||||||
lastChange = HAL_GetTick();
|
|
||||||
switch (buttons) {
|
switch (buttons) {
|
||||||
case BUTTON_NONE:
|
case BUTTON_NONE:
|
||||||
// stay
|
// stay
|
||||||
@@ -274,6 +268,8 @@ static void gui_solderingTempAdjust() {
|
|||||||
systemSettings.SolderingTemp -= 10; // sub 10
|
systemSettings.SolderingTemp -= 10; // sub 10
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// constrain between 50-450 C
|
// constrain between 50-450 C
|
||||||
if (systemSettings.temperatureInF) {
|
if (systemSettings.temperatureInF) {
|
||||||
@@ -288,8 +284,7 @@ static void gui_solderingTempAdjust() {
|
|||||||
if (systemSettings.SolderingTemp < 120)
|
if (systemSettings.SolderingTemp < 120)
|
||||||
systemSettings.SolderingTemp = 120;
|
systemSettings.SolderingTemp = 120;
|
||||||
} else {
|
} else {
|
||||||
if (systemSettings.SolderingTemp < 50)
|
if (systemSettings.SolderingTemp < 50) systemSettings.SolderingTemp = 50;
|
||||||
systemSettings.SolderingTemp = 50;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HAL_GetTick() - lastChange > 1500)
|
if (HAL_GetTick() - lastChange > 1500)
|
||||||
@@ -314,8 +309,8 @@ static void gui_settingsMenu() {
|
|||||||
settingsResetRequest = false;
|
settingsResetRequest = false;
|
||||||
bool earlyExit = false;
|
bool earlyExit = false;
|
||||||
uint32_t descriptionStart = 0;
|
uint32_t descriptionStart = 0;
|
||||||
while ((settingsMenu[currentScreen].incrementHandler.func != NULL)
|
while ((settingsMenu[currentScreen].incrementHandler.func != NULL) &&
|
||||||
&& earlyExit == false) {
|
earlyExit == false) {
|
||||||
lcd.setFont(0);
|
lcd.setFont(0);
|
||||||
lcd.clearScreen();
|
lcd.clearScreen();
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
@@ -326,13 +321,11 @@ static void gui_settingsMenu() {
|
|||||||
} else {
|
} else {
|
||||||
// Draw description
|
// Draw description
|
||||||
// draw string starting from descriptionOffset
|
// draw string starting from descriptionOffset
|
||||||
int16_t maxOffset = strlen(settingsMenu[currentScreen].description)
|
int16_t maxOffset = strlen(settingsMenu[currentScreen].description) + 5;
|
||||||
+ 5;
|
if (descriptionStart == 0) descriptionStart = HAL_GetTick();
|
||||||
if (descriptionStart == 0)
|
|
||||||
descriptionStart = HAL_GetTick();
|
|
||||||
|
|
||||||
int16_t descriptionOffset = (((HAL_GetTick() - descriptionStart)
|
int16_t descriptionOffset =
|
||||||
/ 10) % (maxOffset * 12));
|
(((HAL_GetTick() - descriptionStart) / 3) % (maxOffset * 12));
|
||||||
//^ Rolling offset based on time
|
//^ Rolling offset based on time
|
||||||
lcd.setCursor(((7 * 12) - descriptionOffset), 0);
|
lcd.setCursor(((7 * 12) - descriptionOffset), 0);
|
||||||
lcd.print(settingsMenu[currentScreen].description);
|
lcd.print(settingsMenu[currentScreen].description);
|
||||||
@@ -373,21 +366,19 @@ static void gui_settingsMenu() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BUTTON_NONE:
|
case BUTTON_NONE:
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd.refresh(); // update the LCD
|
lcd.refresh(); // update the LCD
|
||||||
osDelay(20);
|
osDelay(20);
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (settingsResetRequest)
|
if (settingsResetRequest) resetSettings();
|
||||||
resetSettings();
|
|
||||||
saveSettings();
|
saveSettings();
|
||||||
}
|
}
|
||||||
static int gui_showTipTempWarning() {
|
static int gui_showTipTempWarning() {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
||||||
lcd.clearScreen();
|
lcd.clearScreen();
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
@@ -419,8 +410,7 @@ static int gui_showTipTempWarning() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (systemSettings.coolingTempBlink && tipTemp > 50) {
|
if (systemSettings.coolingTempBlink && tipTemp > 50) {
|
||||||
if (HAL_GetTick() % 500 < 250)
|
if (HAL_GetTick() % 500 < 250) lcd.clearScreen();
|
||||||
lcd.clearScreen();
|
|
||||||
}
|
}
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
ButtonState buttons = getButtonState();
|
ButtonState buttons = getButtonState();
|
||||||
@@ -429,8 +419,7 @@ static int gui_showTipTempWarning() {
|
|||||||
else if (buttons == BUTTON_B_SHORT || buttons == BUTTON_BOTH)
|
else if (buttons == BUTTON_B_SHORT || buttons == BUTTON_BOTH)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (tipTemp < 30)
|
if (tipTemp < 30) return 0;
|
||||||
return 0;
|
|
||||||
|
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
GUIDelay();
|
GUIDelay();
|
||||||
@@ -447,22 +436,18 @@ static int gui_SolderingSleepingMode() {
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ButtonState buttons = getButtonState();
|
ButtonState buttons = getButtonState();
|
||||||
if (buttons)
|
if (buttons) return 0;
|
||||||
return 0;
|
if ((HAL_GetTick() - lastMovementTime < 1000) ||
|
||||||
if ((HAL_GetTick() - lastMovementTime < 1000)
|
(HAL_GetTick() - lastButtonTime < 1000))
|
||||||
|| (HAL_GetTick() - lastButtonTime < 1000))
|
|
||||||
return 0; // user moved or pressed a button, go back to soldering
|
return 0; // user moved or pressed a button, go back to soldering
|
||||||
if (checkVoltageForExit())
|
if (checkVoltageForExit()) return 1; // return non-zero on error
|
||||||
return 1; //return non-zero on error
|
|
||||||
|
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
currentlyActiveTemperatureTarget = ftoTipMeasurement(
|
currentlyActiveTemperatureTarget = ftoTipMeasurement(
|
||||||
min(systemSettings.SleepTemp,
|
min(systemSettings.SleepTemp, systemSettings.SolderingTemp));
|
||||||
systemSettings.SolderingTemp));
|
|
||||||
else
|
else
|
||||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(
|
currentlyActiveTemperatureTarget = ctoTipMeasurement(
|
||||||
min(systemSettings.SleepTemp,
|
min(systemSettings.SleepTemp, systemSettings.SolderingTemp));
|
||||||
systemSettings.SolderingTemp));
|
|
||||||
// draw the lcd
|
// draw the lcd
|
||||||
uint16_t tipTemp;
|
uint16_t tipTemp;
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
@@ -484,11 +469,9 @@ static int gui_SolderingSleepingMode() {
|
|||||||
lcd.print("C");
|
lcd.print("C");
|
||||||
|
|
||||||
lcd.print(" ");
|
lcd.print(" ");
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||||
2);
|
|
||||||
lcd.drawChar('.');
|
lcd.drawChar('.');
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
|
||||||
1);
|
|
||||||
lcd.drawChar('V');
|
lcd.drawChar('V');
|
||||||
} else {
|
} else {
|
||||||
lcd.setFont(0);
|
lcd.setFont(0);
|
||||||
@@ -501,8 +484,8 @@ static int gui_SolderingSleepingMode() {
|
|||||||
}
|
}
|
||||||
if (systemSettings.ShutdownTime) // only allow shutdown exit if time > 0
|
if (systemSettings.ShutdownTime) // only allow shutdown exit if time > 0
|
||||||
if (lastMovementTime)
|
if (lastMovementTime)
|
||||||
if (((uint32_t) (HAL_GetTick() - lastMovementTime))
|
if (((uint32_t)(HAL_GetTick() - lastMovementTime)) >
|
||||||
> (uint32_t) (systemSettings.ShutdownTime * 60 * 1000)) {
|
(uint32_t)(systemSettings.ShutdownTime * 60 * 1000)) {
|
||||||
// shutdown
|
// shutdown
|
||||||
currentlyActiveTemperatureTarget = 0;
|
currentlyActiveTemperatureTarget = 0;
|
||||||
return 1; // we want to exit soldering mode
|
return 1; // we want to exit soldering mode
|
||||||
@@ -510,7 +493,6 @@ static int gui_SolderingSleepingMode() {
|
|||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
GUIDelay();
|
GUIDelay();
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void gui_solderingMode() {
|
static void gui_solderingMode() {
|
||||||
@@ -522,7 +504,8 @@ static void gui_solderingMode() {
|
|||||||
* ---> Use buttons to change forward and back on temperature
|
* ---> Use buttons to change forward and back on temperature
|
||||||
* ---> Both buttons or timeout for exiting
|
* ---> Both buttons or timeout for exiting
|
||||||
* --> Long hold front button to enter boost mode
|
* --> Long hold front button to enter boost mode
|
||||||
* ---> Just temporarily sets the system into the alternate temperature for PID control
|
* ---> Just temporarily sets the system into the alternate temperature for
|
||||||
|
* PID control
|
||||||
* --> Long hold back button to exit
|
* --> Long hold back button to exit
|
||||||
* --> Double button to exit
|
* --> Double button to exit
|
||||||
*/
|
*/
|
||||||
@@ -550,8 +533,7 @@ static void gui_solderingMode() {
|
|||||||
break;
|
break;
|
||||||
case BUTTON_F_LONG:
|
case BUTTON_F_LONG:
|
||||||
// if boost mode is enabled turn it on
|
// if boost mode is enabled turn it on
|
||||||
if (systemSettings.boostModeEnabled)
|
if (systemSettings.boostModeEnabled) boostModeOn = true;
|
||||||
boostModeOn = true;
|
|
||||||
break;
|
break;
|
||||||
case BUTTON_F_SHORT:
|
case BUTTON_F_SHORT:
|
||||||
case BUTTON_B_SHORT: {
|
case BUTTON_B_SHORT: {
|
||||||
@@ -560,7 +542,8 @@ static void gui_solderingMode() {
|
|||||||
if (oldTemp != systemSettings.SolderingTemp) {
|
if (oldTemp != systemSettings.SolderingTemp) {
|
||||||
saveSettings(); // only save on change
|
saveSettings(); // only save on change
|
||||||
}
|
}
|
||||||
}
|
} break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// else we update the screen information
|
// else we update the screen information
|
||||||
@@ -601,7 +584,6 @@ static void gui_solderingMode() {
|
|||||||
else
|
else
|
||||||
lcd.drawSymbol(15);
|
lcd.drawSymbol(15);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Draw heating/cooling symbols
|
// Draw heating/cooling symbols
|
||||||
// If tip PWM > 10% then we are 'heating'
|
// If tip PWM > 10% then we are 'heating'
|
||||||
if (getTipPWM() > 10)
|
if (getTipPWM() > 10)
|
||||||
@@ -631,19 +613,19 @@ static void gui_solderingMode() {
|
|||||||
// Update the setpoints for the temperature
|
// Update the setpoints for the temperature
|
||||||
if (boostModeOn) {
|
if (boostModeOn) {
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
currentlyActiveTemperatureTarget = ftoTipMeasurement(
|
currentlyActiveTemperatureTarget =
|
||||||
systemSettings.BoostTemp);
|
ftoTipMeasurement(systemSettings.BoostTemp);
|
||||||
else
|
else
|
||||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(
|
currentlyActiveTemperatureTarget =
|
||||||
systemSettings.BoostTemp);
|
ctoTipMeasurement(systemSettings.BoostTemp);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (systemSettings.temperatureInF)
|
if (systemSettings.temperatureInF)
|
||||||
currentlyActiveTemperatureTarget = ftoTipMeasurement(
|
currentlyActiveTemperatureTarget =
|
||||||
systemSettings.SolderingTemp);
|
ftoTipMeasurement(systemSettings.SolderingTemp);
|
||||||
else
|
else
|
||||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(
|
currentlyActiveTemperatureTarget =
|
||||||
systemSettings.SolderingTemp);
|
ctoTipMeasurement(systemSettings.SolderingTemp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Undervoltage test
|
// Undervoltage test
|
||||||
@@ -653,8 +635,8 @@ static void gui_solderingMode() {
|
|||||||
|
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
if (systemSettings.sensitivity)
|
if (systemSettings.sensitivity)
|
||||||
if (HAL_GetTick() - lastMovementTime > sleepThres
|
if (HAL_GetTick() - lastMovementTime > sleepThres &&
|
||||||
&& HAL_GetTick() - lastButtonTime > sleepThres) {
|
HAL_GetTick() - lastButtonTime > sleepThres) {
|
||||||
if (gui_SolderingSleepingMode()) {
|
if (gui_SolderingSleepingMode()) {
|
||||||
return; // If the function returns non-0 then exit
|
return; // If the function returns non-0 then exit
|
||||||
}
|
}
|
||||||
@@ -662,7 +644,6 @@ static void gui_solderingMode() {
|
|||||||
GUIDelay();
|
GUIDelay();
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#define ACCELDEBUG 0
|
#define ACCELDEBUG 0
|
||||||
/* StartGUITask function */
|
/* StartGUITask function */
|
||||||
@@ -677,7 +658,8 @@ void startGUITask(void const * argument) {
|
|||||||
* ---> Use buttons to change forward and back on temperature
|
* ---> Use buttons to change forward and back on temperature
|
||||||
* ---> Both buttons or timeout for exiting
|
* ---> Both buttons or timeout for exiting
|
||||||
* --> Long hold front button to enter boost mode
|
* --> Long hold front button to enter boost mode
|
||||||
* ---> Just temporarily sets the system into the alternate temperature for PID control
|
* ---> Just temporarily sets the system into the alternate temperature for
|
||||||
|
* PID control
|
||||||
* --> Long hold back button to exit
|
* --> Long hold back button to exit
|
||||||
* --> Double button to exit
|
* --> Double button to exit
|
||||||
* * Settings Menu (gui_settingsMenu)
|
* * Settings Menu (gui_settingsMenu)
|
||||||
@@ -691,13 +673,11 @@ void startGUITask(void const * argument) {
|
|||||||
uint8_t tempWarningState = 0;
|
uint8_t tempWarningState = 0;
|
||||||
|
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
if (showBootLogoIfavailable())
|
if (showBootLogoIfavailable()) waitForButtonPressOrTimeout(2000);
|
||||||
waitForButtonPressOrTimeout(2000);
|
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
if (systemSettings.autoStartMode) {
|
if (systemSettings.autoStartMode) {
|
||||||
// jump directly to the autostart mode
|
// jump directly to the autostart mode
|
||||||
if (systemSettings.autoStartMode == 1)
|
if (systemSettings.autoStartMode == 1) gui_solderingMode();
|
||||||
gui_solderingMode();
|
|
||||||
}
|
}
|
||||||
#if ACCELDEBUG
|
#if ACCELDEBUG
|
||||||
|
|
||||||
@@ -710,8 +690,7 @@ void startGUITask(void const * argument) {
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ButtonState buttons = getButtonState();
|
ButtonState buttons = getButtonState();
|
||||||
if (tempWarningState == 2)
|
if (tempWarningState == 2) buttons = BUTTON_F_SHORT;
|
||||||
buttons = BUTTON_F_SHORT;
|
|
||||||
switch (buttons) {
|
switch (buttons) {
|
||||||
case BUTTON_NONE:
|
case BUTTON_NONE:
|
||||||
// Do nothing
|
// Do nothing
|
||||||
@@ -732,7 +711,6 @@ void startGUITask(void const * argument) {
|
|||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
waitForButtonPress();
|
waitForButtonPress();
|
||||||
lcd.setFont(0); // reset font
|
lcd.setFont(0); // reset font
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BUTTON_F_LONG:
|
case BUTTON_F_LONG:
|
||||||
@@ -750,23 +728,26 @@ void startGUITask(void const * argument) {
|
|||||||
lcd.displayOnOff(true); // turn lcd on
|
lcd.displayOnOff(true); // turn lcd on
|
||||||
gui_settingsMenu(); // enter the settings menu
|
gui_settingsMenu(); // enter the settings menu
|
||||||
saveSettings();
|
saveSettings();
|
||||||
setCalibrationOffset(systemSettings.CalibrationOffset); //ensure cal offset is applied
|
setCalibrationOffset(
|
||||||
|
systemSettings.CalibrationOffset); // ensure cal offset is applied
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
currentlyActiveTemperatureTarget = 0; // ensure tip is off
|
currentlyActiveTemperatureTarget = 0; // ensure tip is off
|
||||||
|
|
||||||
if (systemSettings.sensitivity) {
|
if (systemSettings.sensitivity) {
|
||||||
if ((HAL_GetTick() - lastMovementTime) > 60000
|
if ((HAL_GetTick() - lastMovementTime) > 60000 &&
|
||||||
&& (HAL_GetTick() - lastButtonTime) > 60000)
|
(HAL_GetTick() - lastButtonTime) > 60000)
|
||||||
lcd.displayOnOff(false); // turn lcd off when no movement
|
lcd.displayOnOff(false); // turn lcd off when no movement
|
||||||
else if (HAL_GetTick() - lastMovementTime < 1000
|
else if (HAL_GetTick() - lastMovementTime < 1000 ||
|
||||||
|| HAL_GetTick() - lastButtonTime < 1000) /*Use short time for test, and prevent lots of I2C writes for no need*/
|
HAL_GetTick() - lastButtonTime <
|
||||||
|
1000) /*Use short time for test, and prevent lots of I2C
|
||||||
|
writes for no need*/
|
||||||
lcd.displayOnOff(true); // turn lcd back on
|
lcd.displayOnOff(true); // turn lcd back on
|
||||||
|
|
||||||
}
|
}
|
||||||
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
||||||
if (tipTemp > 600)
|
if (tipTemp > 600) tipTemp = 0;
|
||||||
tipTemp = 0;
|
|
||||||
if (tipTemp > 50) {
|
if (tipTemp > 50) {
|
||||||
if (tempWarningState == 0) {
|
if (tempWarningState == 0) {
|
||||||
currentlyActiveTemperatureTarget = 0; // ensure tip is off
|
currentlyActiveTemperatureTarget = 0; // ensure tip is off
|
||||||
@@ -797,11 +778,9 @@ void startGUITask(void const * argument) {
|
|||||||
}
|
}
|
||||||
lcd.setCursor(0, 8);
|
lcd.setCursor(0, 8);
|
||||||
lcd.print("Input V: ");
|
lcd.print("Input V: ");
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||||
2);
|
|
||||||
lcd.drawChar('.');
|
lcd.drawChar('.');
|
||||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10,
|
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
|
||||||
1);
|
|
||||||
lcd.print("V");
|
lcd.print("V");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -815,24 +794,25 @@ void startGUITask(void const * argument) {
|
|||||||
lcd.setCursor(84, 0);
|
lcd.setCursor(84, 0);
|
||||||
gui_drawBatteryIcon();
|
gui_drawBatteryIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
animationStep++;
|
animationStep++;
|
||||||
HAL_IWDG_Refresh(&hiwdg);
|
HAL_IWDG_Refresh(&hiwdg);
|
||||||
GUIDelay();
|
GUIDelay();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* StartPIDTask function */
|
/* StartPIDTask function */
|
||||||
void startPIDTask(void const *argument) {
|
void startPIDTask(void const *argument) {
|
||||||
/*
|
/*
|
||||||
* We take the current tip temperature & evaluate the next step for the tip control PWM
|
* We take the current tip temperature & evaluate the next step for the tip
|
||||||
* Tip temperature is measured by getTipTemperature(1) so we get instant result
|
* control PWM
|
||||||
|
* Tip temperature is measured by getTipTemperature(1) so we get instant
|
||||||
|
* result
|
||||||
* This comes in Cx10 format
|
* This comes in Cx10 format
|
||||||
* We then control the tip temperature to aim for the setpoint in the settings struct
|
* We then control the tip temperature to aim for the setpoint in the settings
|
||||||
|
* struct
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int32_t integralCount = 0;
|
int32_t integralCount = 0;
|
||||||
@@ -844,13 +824,15 @@ void startPIDTask(void const * argument) {
|
|||||||
kd = 40;
|
kd = 40;
|
||||||
kb = 0;
|
kb = 0;
|
||||||
// REMEBER ^^^^ These constants are backwards
|
// REMEBER ^^^^ These constants are backwards
|
||||||
// They act as dividers, so to 'increase' a P term, you make the number smaller.
|
// 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
|
||||||
if (currentlyActiveTemperatureTarget) {
|
if (currentlyActiveTemperatureTarget) {
|
||||||
// Compute the PID loop in here
|
// Compute the PID loop in here
|
||||||
//Because our values here are quite large for all measurements (0-16k ~= 33 counts per C)
|
// Because our values here are quite large for all measurements (0-16k ~=
|
||||||
|
// 33 counts per C)
|
||||||
// P I & D are divisors, so inverse logic applies (beware)
|
// P I & D are divisors, so inverse logic applies (beware)
|
||||||
|
|
||||||
int32_t rawTempError = currentlyActiveTemperatureTarget - rawTemp;
|
int32_t rawTempError = currentlyActiveTemperatureTarget - rawTemp;
|
||||||
@@ -865,12 +847,9 @@ void startPIDTask(void const * argument) {
|
|||||||
|
|
||||||
/*Compute PID Output*/
|
/*Compute PID Output*/
|
||||||
int32_t output = (rawTempError / kp);
|
int32_t output = (rawTempError / kp);
|
||||||
if (ki)
|
if (ki) output += integralCount;
|
||||||
output += integralCount;
|
if (kd) output -= (dInput / kd);
|
||||||
if (kd)
|
if (kb) output -= backoffOverflow / kb;
|
||||||
output -= (dInput / kd);
|
|
||||||
if (kb)
|
|
||||||
output -= backoffOverflow / kb;
|
|
||||||
|
|
||||||
if (output > 100) {
|
if (output > 100) {
|
||||||
backoffOverflow = output;
|
backoffOverflow = output;
|
||||||
@@ -888,7 +867,8 @@ void startPIDTask(void const * argument) {
|
|||||||
}
|
}
|
||||||
setTipPWM(output);
|
setTipPWM(output);
|
||||||
} else {
|
} else {
|
||||||
setTipPWM(0); //disable the output driver if the output is set to be off elsewhere
|
setTipPWM(0); // disable the output driver if the output is set to be off
|
||||||
|
// elsewhere
|
||||||
integralCount = 0;
|
integralCount = 0;
|
||||||
backoffOverflow = 0;
|
backoffOverflow = 0;
|
||||||
derivativeLastValue = 0;
|
derivativeLastValue = 0;
|
||||||
@@ -910,8 +890,7 @@ void startMOVTask(void const * argument) {
|
|||||||
memset(dataz, 0, MOVFilter * sizeof(int16_t));
|
memset(dataz, 0, MOVFilter * sizeof(int16_t));
|
||||||
int16_t tx, ty, tz;
|
int16_t tx, ty, tz;
|
||||||
int32_t avgx, avgy, avgz;
|
int32_t avgx, avgy, avgz;
|
||||||
if (systemSettings.sensitivity > 9)
|
if (systemSettings.sensitivity > 9) systemSettings.sensitivity = 9;
|
||||||
systemSettings.sensitivity = 9;
|
|
||||||
#if ACCELDEBUG
|
#if ACCELDEBUG
|
||||||
uint32_t max = 0;
|
uint32_t max = 0;
|
||||||
#endif
|
#endif
|
||||||
@@ -950,10 +929,10 @@ 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) {
|
||||||
// calculate averages
|
// calculate averages
|
||||||
avgx = avgy = avgz = 0;
|
avgx = avgy = avgz = 0;
|
||||||
@@ -966,7 +945,8 @@ void startMOVTask(void const * argument) {
|
|||||||
avgy /= MOVFilter;
|
avgy /= MOVFilter;
|
||||||
avgz /= MOVFilter;
|
avgz /= MOVFilter;
|
||||||
|
|
||||||
//So now we have averages, we want to look if these are different by more than the threshold
|
// So now we have averages, we want to look if these are different by more
|
||||||
|
// than the threshold
|
||||||
int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
||||||
// If error has occured then we update the tick timer
|
// If error has occured then we update the tick timer
|
||||||
if (error > threshold) {
|
if (error > threshold) {
|
||||||
@@ -975,7 +955,6 @@ void startMOVTask(void const * argument) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
osDelay(100); // Slow down update rate
|
osDelay(100); // Slow down update rate
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* StartRotationTask function */
|
/* StartRotationTask function */
|
||||||
@@ -989,7 +968,8 @@ void startRotationTask(void const * argument) {
|
|||||||
HAL_NVIC_EnableIRQ(EXTI3_IRQn);
|
HAL_NVIC_EnableIRQ(EXTI3_IRQn);
|
||||||
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 5, 0);
|
HAL_NVIC_SetPriority(EXTI9_5_IRQn, 5, 0);
|
||||||
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
|
HAL_NVIC_EnableIRQ(EXTI9_5_IRQn);
|
||||||
//^ We hold off enabling these until now to ensure the semaphore is available to be used first
|
//^ We hold off enabling these until now to ensure the semaphore is available
|
||||||
|
// to be used first
|
||||||
switch (systemSettings.OrientationMode) {
|
switch (systemSettings.OrientationMode) {
|
||||||
case 0:
|
case 0:
|
||||||
lcd.setRotation(false);
|
lcd.setRotation(false);
|
||||||
@@ -1000,18 +980,19 @@ void startRotationTask(void const * argument) {
|
|||||||
case 2:
|
case 2:
|
||||||
lcd.setRotation(false);
|
lcd.setRotation(false);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if ( xSemaphoreTake( rotationChangedSemaphore, portMAX_DELAY ) == pdTRUE
|
if (xSemaphoreTake(rotationChangedSemaphore, portMAX_DELAY) == pdTRUE ||
|
||||||
|| (HAL_GPIO_ReadPin(INT_Orientation_GPIO_Port,
|
(HAL_GPIO_ReadPin(INT_Orientation_GPIO_Port, INT_Orientation_Pin) ==
|
||||||
INT_Orientation_Pin) == GPIO_PIN_RESET)) {
|
GPIO_PIN_RESET)) {
|
||||||
// a rotation event has occured
|
// a rotation event has occured
|
||||||
bool rotation = accel.getOrientation();
|
bool rotation = accel.getOrientation();
|
||||||
if (systemSettings.OrientationMode == 2)
|
if (systemSettings.OrientationMode == 2)
|
||||||
lcd.setRotation(rotation); // link the data through
|
lcd.setRotation(rotation); // link the data through
|
||||||
}
|
}
|
||||||
osDelay(300);
|
osDelay(300);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1019,16 +1000,16 @@ void startRotationTask(void const * argument) {
|
|||||||
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) {
|
||||||
static signed long xHigherPriorityTaskWoken;
|
static signed long xHigherPriorityTaskWoken;
|
||||||
if (GPIO_Pin == INT_Orientation_Pin) {
|
if (GPIO_Pin == INT_Orientation_Pin) {
|
||||||
xSemaphoreGiveFromISR(rotationChangedSemaphore,
|
xSemaphoreGiveFromISR(rotationChangedSemaphore, &xHigherPriorityTaskWoken);
|
||||||
&xHigherPriorityTaskWoken);
|
|
||||||
} else if (GPIO_Pin == INT_Movement_Pin) {
|
} else if (GPIO_Pin == INT_Movement_Pin) {
|
||||||
// New data is available for reading from the unit
|
// New data is available for reading from the unit
|
||||||
//xSemaphoreGiveFromISR(accelDataAvailableSemaphore, &xHigherPriorityTaskWoken);
|
// xSemaphoreGiveFromISR(accelDataAvailableSemaphore,
|
||||||
|
// &xHigherPriorityTaskWoken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FLASH_LOGOADDR (0x8000000|0xB800) /*second last page of flash set aside for logo image*/
|
#define FLASH_LOGOADDR \
|
||||||
|
(0x8000000 | 0xB800) /*second last page of flash set aside for logo image*/
|
||||||
|
|
||||||
bool showBootLogoIfavailable() {
|
bool showBootLogoIfavailable() {
|
||||||
// check if the header is there (0xAA,0x55,0xF0,0x0D)
|
// check if the header is there (0xAA,0x55,0xF0,0x0D)
|
||||||
@@ -1042,20 +1023,14 @@ bool showBootLogoIfavailable() {
|
|||||||
for (uint8_t i = 0; i < 98; i++) {
|
for (uint8_t i = 0; i < 98; i++) {
|
||||||
temp8[i * 2] = temp[i] >> 8;
|
temp8[i * 2] = temp[i] >> 8;
|
||||||
temp8[i * 2 + 1] = temp[i] & 0xFF;
|
temp8[i * 2 + 1] = temp[i] & 0xFF;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp8[0] != 0xAA)
|
if (temp8[0] != 0xAA) return false;
|
||||||
return false;
|
if (temp8[1] != 0x55) return false;
|
||||||
if (temp8[1] != 0x55)
|
if (temp8[2] != 0xF0) return false;
|
||||||
return false;
|
if (temp8[3] != 0x0D) return false;
|
||||||
if (temp8[2] != 0xF0)
|
|
||||||
return false;
|
|
||||||
if (temp8[3] != 0x0D)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
lcd.drawArea(0, 0, 96, 16, (uint8_t *)(temp8 + 4));
|
lcd.drawArea(0, 0, 96, 16, (uint8_t *)(temp8 + 4));
|
||||||
lcd.refresh();
|
lcd.refresh();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user