Layered menu (#229)
* Split menu handling,speed up OLED * Split menu apart Split menu apart. Next to add icons etc * Finished main menu re-layout * Added menu option for scroll speed * Speed up scroll settings, pad translations
This commit is contained in:
BIN
Development Resources/Images/Calibration.jpg
Normal file
BIN
Development Resources/Images/Calibration.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 718 B |
BIN
Development Resources/Images/Settings.jpg
Normal file
BIN
Development Resources/Images/Settings.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 691 B |
BIN
Development Resources/Images/Sleep.jpg
Normal file
BIN
Development Resources/Images/Sleep.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 747 B |
BIN
Development Resources/Images/Soldering.jpg
Normal file
BIN
Development Resources/Images/Soldering.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 688 B |
BIN
Development Resources/Images/UI.jpg
Normal file
BIN
Development Resources/Images/UI.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 729 B |
@@ -130,7 +130,7 @@
|
||||
<builder buildPath="${workspace_loc:/TS100}/Release" id="fr.ac6.managedbuild.builder.gnu.cross.548236022" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1363306495" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1100266163" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.2139237845" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.2139237845" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1770182855" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
@@ -150,12 +150,14 @@
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.dialect.std.356859384" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.1580070223" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="gnu.c.compiler.option.misc.pic.1841660469" name="Position Independent Code (-fPIC)" superClass="gnu.c.compiler.option.misc.pic" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.747173367" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1210653460" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1414722294" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1489744363" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.641509376" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.641509376" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.105977434" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
@@ -175,12 +177,14 @@
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.2101054556" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata.1877154487" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.688034595" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.6473827" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1409185098" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.162825548" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.strip.459660118" name="Omit all symbol information (-s)" superClass="gnu.cpp.link.option.strip" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.gcsections.664103720" name="Discard unused sections (-Wl,--gc-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.gcsections" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1735005640" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
@@ -201,6 +205,10 @@
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588000933" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1118741214" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.exe.release.63862661" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.exe.release">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.983697759" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1721181053" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="3703734836139458" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1008654812523547119" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -595,6 +595,47 @@ const uint8_t idleScreenBGF[] = {
|
||||
0x87,0x86,0x86,0x86,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00
|
||||
};
|
||||
|
||||
/*
|
||||
* 16x16 icons
|
||||
* */
|
||||
const uint8_t SettingsMenuIcons[] = {
|
||||
|
||||
// Soldering
|
||||
//width = 16
|
||||
//height = 16
|
||||
0x00,0x00,0x02,0x04,0x09,0x11,0x23,0xC3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x07,0x0A,0x14,0x28,0x50,0x60,0x00,
|
||||
|
||||
|
||||
|
||||
//Sleep
|
||||
//width = 16
|
||||
//height = 16
|
||||
0x00,0x00,0x00,0xC6,0xE6,0xF6,0xBE,0x9E,0x86,0x00,0x40,0x40,0xC0,0xC0,0xC0,0x00,
|
||||
0x00,0x00,0x00,0x01,0x01,0x45,0x65,0x75,0x5D,0x00,0x06,0x07,0x07,0x05,0x04,0x00,
|
||||
|
||||
|
||||
|
||||
//Menu
|
||||
//width = 16
|
||||
//height = 16
|
||||
0x00,0x80,0x18,0x98,0x58,0x18,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x00,0x00,
|
||||
0x00,0x00,0x19,0x18,0x00,0x00,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x00,0x00,
|
||||
|
||||
//Wrench
|
||||
//width = 16
|
||||
//height = 16
|
||||
0x00,0x00,0x18,0x30,0x32,0x7E,0x7C,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0F,0x3E,0x7E,0x4C,0x0C,0x18,0x00,
|
||||
#ifdef NOTUSED
|
||||
//Calibration (Not used, kept for future menu layouts)
|
||||
//width = 16
|
||||
//height = 16
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x70,0x7A,0x5E,0x8E,0x1C,0x30,0x00,
|
||||
0x00,0x20,0x70,0x38,0x1C,0x0E,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
#endif
|
||||
};
|
||||
|
||||
const uint8_t FONT_6x8[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 000: ' ' U+0020 (utf-8: 20)
|
||||
0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, // 001: '!' U+0021 (utf-8: 21)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define SETTINGS_H_
|
||||
#include <stdint.h>
|
||||
#include "stm32f1xx_hal.h"
|
||||
#define SETTINGSVERSION 0x11 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
#define SETTINGSVERSION 0x12 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
|
||||
/*
|
||||
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
||||
@@ -30,6 +30,7 @@ typedef struct {
|
||||
uint8_t detailedIDLE :1; //Detailed idle screen
|
||||
uint8_t detailedSoldering :1; //Detailed soldering screens
|
||||
uint8_t temperatureInF; //Should the temp be in F or C (true is F)
|
||||
uint8_t descriptionScrollSpeed:1; // Description scroll speed
|
||||
uint16_t voltageDiv; //Voltage divisor factor
|
||||
uint16_t BoostTemp; //Boost mode set point for the iron
|
||||
int16_t CalibrationOffset; //This stores the temperature offset for this tip in the iron.
|
||||
@@ -37,7 +38,7 @@ typedef struct {
|
||||
uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off
|
||||
} systemSettingsType;
|
||||
|
||||
extern systemSettingsType systemSettings;
|
||||
extern volatile systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings();
|
||||
void restoreSettings();
|
||||
|
||||
@@ -17,8 +17,11 @@ enum ShortNameType {
|
||||
* use SettingsShortNames as SettingsShortNames[16][1].. second column undefined
|
||||
*/
|
||||
extern const enum ShortNameType SettingsShortNameType;
|
||||
extern const char* SettingsShortNames[16][2];
|
||||
extern const char* SettingsLongNames[16];
|
||||
extern const char* SettingsShortNames[17][2];
|
||||
extern const char* SettingsDescriptions[17];
|
||||
extern const char* SettingsMenuEntries[4];
|
||||
extern const char* SettingsMenuEntriesDescriptions[4];
|
||||
|
||||
extern const char* SettingsCalibrationWarning;
|
||||
extern const char* SettingsResetWarning;
|
||||
extern const char* UVLOWarningString;
|
||||
@@ -43,6 +46,9 @@ extern const char SettingRightChar;
|
||||
extern const char SettingLeftChar;
|
||||
extern const char SettingAutoChar;
|
||||
|
||||
#define LANG_EN
|
||||
extern const char SettingFastChar;
|
||||
extern const char SettingSlowChar;
|
||||
|
||||
|
||||
|
||||
#endif /* TRANSLATION_H_ */
|
||||
|
||||
@@ -5,17 +5,16 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
#ifndef GUI_H_
|
||||
#define GUI_H_
|
||||
#ifndef GUI_HPP_
|
||||
#define GUI_HPP_
|
||||
#include "Translation.h"
|
||||
#include "Settings.h"
|
||||
#include "hardware.h"
|
||||
|
||||
//GUI holds the menu structure and all its methods for the menu itself
|
||||
|
||||
#include "main.hpp"
|
||||
#include "Settings.h"
|
||||
#include "Translation.h"
|
||||
//Declarations for all the methods for the settings menu (at end of this file)
|
||||
|
||||
|
||||
//Wrapper for holding a function pointer
|
||||
typedef struct state_func_t {
|
||||
void (*func)(void);
|
||||
@@ -28,6 +27,7 @@ typedef struct {
|
||||
const state_func draw;
|
||||
} menuitem;
|
||||
|
||||
extern const menuitem settingsMenu[];
|
||||
void enterSettingsMenu();
|
||||
extern const menuitem rootSettingsMenu[];
|
||||
|
||||
#endif /* GUI_H_ */
|
||||
#endif /* GUI_HPP_ */
|
||||
@@ -101,6 +101,11 @@ void OLED::refresh() {
|
||||
* Precursor is the command char that is used to select the table.
|
||||
*/
|
||||
void OLED::drawChar(char c, char PrecursorCommand) {
|
||||
if( c=='\n' && cursor_y==0)
|
||||
{
|
||||
cursor_x=0;
|
||||
cursor_y=8;
|
||||
}
|
||||
if (c < ' ') {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "Setup.h"
|
||||
#define FLASH_ADDR (0x8000000|0xFC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
|
||||
#include "string.h"
|
||||
systemSettingsType systemSettings;
|
||||
volatile systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings() {
|
||||
//First we erase the flash
|
||||
@@ -89,6 +89,7 @@ void resetSettings() {
|
||||
systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C
|
||||
systemSettings.CalibrationOffset = 10; //This appears to be quite close for both of my tips, in both of my handles
|
||||
systemSettings.temperatureInF = 0; //default to 0
|
||||
systemSettings.descriptionScrollSpeed=0;//default to slow
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ static void MX_ADC1_Init(void) {
|
||||
static void MX_I2C1_Init(void) {
|
||||
|
||||
hi2c1.Instance = I2C1;
|
||||
hi2c1.Init.ClockSpeed = 100000;
|
||||
hi2c1.Init.ClockSpeed = 300000;//200Khz
|
||||
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
|
||||
hi2c1.Init.OwnAddress1 = 0;
|
||||
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
#include "Translation.h"
|
||||
|
||||
#ifndef LANG
|
||||
#define LANG_EN
|
||||
#endif
|
||||
// TEMPLATES for short names - choose one and use it as base for your
|
||||
// translation:
|
||||
|
||||
@@ -47,10 +49,12 @@
|
||||
// /* (<= 16) Settings reset command */ {"Factory", "Reset?"},
|
||||
// /* (<= 16) Calibrate input voltage */ {"Calibrate", "input voltage?"},
|
||||
// /* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder screen"},
|
||||
// /* (<= 11) Display Help Text Scroll Speed */ {"Description","Scroll Speed"},
|
||||
//};
|
||||
|
||||
#ifdef LANG_EN
|
||||
const char* SettingsLongNames[16] = {
|
||||
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Power source. Sets cutoff voltage. <DC 10V> <S 3.3V per cell>",
|
||||
@@ -69,6 +73,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Reset all settings",
|
||||
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
|
||||
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
||||
@@ -92,8 +97,11 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
const char* SettingsShortNames[17][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Power", "source"},
|
||||
/* (<= 9) Sleep temperature */ {"Sleep", "temp"},
|
||||
/* (<= 9) Sleep timeout */ {"Sleep", "timeout"},
|
||||
@@ -110,11 +118,24 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 16) Settings reset command */ {"Factory", "reset?"},
|
||||
/* (<= 16) Calibrate input voltage */ {"Calibrate", "input voltage?"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Detailed", "solder screen"},
|
||||
/* (<= 11) Display Help Text Scroll Speed */ {"Description","Scroll Speed"},
|
||||
};
|
||||
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_RU
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>",
|
||||
@@ -133,6 +154,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Сброс всех настроек.",
|
||||
/* Calibrate input voltage */ "Калибровка напряжения входа. Настройка кнопками, нажать и удержать чтобы завершить.",
|
||||
/* Advanced soldering screen enabled */ "Показывать детальную информацию при пайке.",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Убедитесь, что жало остыло до комнатной температуры, прежде чем продолжать!";
|
||||
@@ -162,6 +184,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"ИстП "},
|
||||
@@ -181,10 +206,22 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"КалибрU?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ИнфПай "},
|
||||
};
|
||||
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_ES
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Fuente de energía. Ajusta el límite inferior de voltaje. <DC=10V S=3.3V por celda>",
|
||||
@@ -203,6 +240,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Reset all settings",
|
||||
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
|
||||
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
||||
@@ -226,6 +264,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -245,10 +286,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_SE
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Источник питания. Установка напряжения отключения. <DC 10V> <S 3.3 V на батарею>",
|
||||
@@ -267,6 +319,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Reset all settings",
|
||||
/* Calibrate input voltage */ "VIN Calibration. Buttons adjust, long press to exit",
|
||||
/* Advanced soldering screen enabled */ "Display detailed information while soldering",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
||||
@@ -290,6 +343,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -309,10 +365,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_IT
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */"Scegli la sorgente di alimentazione; imposta la soglia di scaricamento per alimentazione Li-Po <DC: 10V; S: 3.3V per cella>",
|
||||
@@ -331,6 +398,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */"Ripristina tutte le impostazioni",
|
||||
/* Calibrate input voltage */"Calibra la tensione in ingresso; regola con i bottoni, tieni premuto per uscire",
|
||||
/* Advanced soldering screen enabled */"Mostra informazioni dettagliate in modalità saldatura",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Assicurati che la punta si trovi a temperatura ambiente prima di continuare!";
|
||||
@@ -354,6 +422,9 @@ const char SettingRightChar = 'D';
|
||||
const char SettingLeftChar = 'S';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Sorgente", "alimentaz"},
|
||||
@@ -373,10 +444,21 @@ const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
/* (<= 16) Calibrate input voltage */ {"Calibrazione", "tensione"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Dettagli", "saldatura"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_FR
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Source d'alimentation. Règle la tension de coupure <DC=10V S=3.3V par cellules>",
|
||||
@@ -395,6 +477,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Réinitialiser tous les réglages",
|
||||
/* Calibrate input voltage */ "Étalonner la tension d'entrée. Boutons pour ajuster, appui long pour quitter",
|
||||
/* Advanced soldering screen enabled */ "Afficher des informations détaillées pendant la soudure",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Assurez-vous que la panne soit à température ambiante avant de continuer!";
|
||||
@@ -418,6 +501,9 @@ const char SettingRightChar = 'D';
|
||||
const char SettingLeftChar = 'G';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Source", "d'alim"},
|
||||
@@ -437,10 +523,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 16) Calibrate input voltage */ {"Étalonner", "tension d'entrée"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Écran soudure", "détaillé"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_DE
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Spannungsquelle (Abschaltspannung) <DC=10V, nS=n*3.3V für n LiIon-Zellen>",
|
||||
@@ -459,6 +556,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Alle Einstellungen zurücksetzen",
|
||||
/* Calibrate input voltage */ "Kalibrierung der Eingangsspannung. Kurzer Tastendruck zum Einstellen, langer Tastendruck zum Verlassen.",
|
||||
/* Advanced soldering screen enabled */ "Detaillierte Anzeige im Lötmodus <J=An, N=Aus>",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Vor dem Fortfahren muss die Lötspitze vollständig abgekühlt sein!";
|
||||
@@ -482,6 +580,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Spannungs-", "quelle"},
|
||||
@@ -501,10 +602,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 16) Calibrate input voltage */ {"Eingangsspannung", "kalibrieren?"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Detaillierte", "Loetansicht"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_SK
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Zdroj napatia. Nastavit napatie pre vypnutie (cutoff) <DC=10V, nS=n*3.3V pre LiIon clanky>",
|
||||
@@ -523,6 +635,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Tovarenske nastavenia",
|
||||
/* Calibrate input voltage */ "Kalibracia VIN. Kratke stlacenie meni nastavenie, dlhe stlacenie pre navrat",
|
||||
/* Advanced soldering screen enabled */ "Zobrazenie detailov pocas spajkovania <T=Zap, F=Vyp>",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Najprv sa prosim uistite, ze hrot ma izbovu teplotu!";
|
||||
@@ -546,6 +659,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -565,10 +681,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_TR
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// 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>",
|
||||
@@ -587,6 +714,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Bütün ayarları sıfırla",
|
||||
/* Calibrate input voltage */ "VIN Kalibrasyonu. Düğmeler ayarlar, çıkmak için uzun bas.",
|
||||
/* Advanced soldering screen enabled */ "Lehimleme yaparken detaylı bilgi göster",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!";
|
||||
@@ -610,6 +738,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -629,10 +760,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_HR
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Izvor napajanja. Postavlja napon isključivanja. <DC 10V> <S 3.3V po ćeliji>",
|
||||
@@ -651,6 +793,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Vraćanje svih postavki.",
|
||||
/* Calibrate input voltage */ "Kalibracija ulaznog napona. Podešavanje gumbima, dugački pritisak za kraj.",
|
||||
/* Advanced soldering screen enabled */ "Prikazivanje detaljnih informacija tijekom lemljenja.",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Provjerite da je vršak ohlađen na sobnu temperaturu prije nego što nastavite!";
|
||||
@@ -674,6 +817,9 @@ const char SettingRightChar = 'D';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Izvor", "napajanja"},
|
||||
@@ -693,10 +839,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 16) Calibrate input voltage */ {"Kalibracija", "napona napajanja"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Detalji", "pri lemljenju"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_CS_CZ
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length
|
||||
/* Power source (DC or batt) */ "Při nižším napětí ukončí pájení <DC=10V, xS=x*3.3V pro LiPo,LiIon...>",
|
||||
@@ -715,6 +872,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Obnovení továrního nastavení.",
|
||||
/* Calibrate input voltage */ "Kalibrace vstupního napětí. Tlačítky uprav, podržením potvrď.",
|
||||
/* Advanced soldering screen enabled */ "Zobrazit podrobnosti při pájení?",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Ujistěte se, že hrot má pokojovou teplotu! "; // ending space needed
|
||||
@@ -738,6 +896,9 @@ const char SettingRightChar = 'P';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_DOUBLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 11) Power source (DC or batt) */ {"Zdroj", "napájení"},
|
||||
@@ -757,10 +918,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 16) Calibrate input voltage */ {"Kalibrovat", "vstupní napětí?"},
|
||||
/* (<= 13) Advanced soldering screen enabled */ {"Podrobnosti", "při pájení"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_HUN
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length
|
||||
/* Power source (DC or batt) */ "Áramforrás. Beállítja a lekapcsolási feszültséget. <DC 10V> <S 3.3V cellánként>",
|
||||
@@ -779,6 +951,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Beállítások alaphelyzetbe állítása",
|
||||
/* Calibrate input voltage */ "A bemeneti feszültség kalibrálása. Röviden megnyomva állítsa be, hosszan nyomja meg a kilépéshez.",
|
||||
/* Advanced soldering screen enabled */ "Részletes információk megjelenítése forrasztás közben",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Folytatás előtt győződj meg róla, hogy a hegy szobahőmérsékletű!";
|
||||
@@ -802,6 +975,9 @@ const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -821,10 +997,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_DK
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length
|
||||
/* Power source (DC or batt) */ "Strømforsyning. Indstil Cutoff Spændingen. <DC 10V <S 3.3V per cell",
|
||||
@@ -843,6 +1030,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Gendan alle indstillinger",
|
||||
/* Calibrate input voltage */ "VIN kalibrering. Knapperne justere, Lang tryk for at gå ud",
|
||||
/* Advanced soldering screen enabled */ "Vis detialieret information mens der loddes",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Sørg for at loddespidsen er ved stuetemperatur, inden du fortsætter!";
|
||||
@@ -866,6 +1054,9 @@ const char SettingRightChar = 'H';
|
||||
const char SettingLeftChar = 'V';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -885,10 +1076,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_PL
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length
|
||||
/* Power source (DC or batt) */ "Źródło zasilania. Ustaw napięcie odcięcia. <DC 10V> <S 3.3V dla ogniw Li>",
|
||||
@@ -907,6 +1109,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Zresetuj wszystkie ustawienia",
|
||||
/* Calibrate input voltage */ "Kalibracja napięcia wejściowego. Krótkie naciśnięcie, aby ustawić, długie naciśnięcie, aby wyjść.",
|
||||
/* Advanced soldering screen enabled */ "Wyświetl szczegółowe informacje podczas lutowania <T = wł., N = wył.>",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Przed kontynuowaniem upewnij się, że końcówka osiągnela temperature pokojowa!";
|
||||
@@ -930,6 +1133,9 @@ const char SettingRightChar = 'P';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 5) Power source (DC or batt) */ {"PWRSC"},
|
||||
@@ -949,10 +1155,21 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL VIN?"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"ADVSLD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef LANG_BR
|
||||
const char* SettingsLongNames[16] = {
|
||||
const char* SettingsDescriptions[17] = {
|
||||
// These are all the help text for all the settings.
|
||||
// No requirements on spacing or length.
|
||||
/* Power source (DC or batt) */ "Fonte de alimentação. Define a tensão de corte. <DC 10V> <S 3.3V por célula>",
|
||||
@@ -971,6 +1188,7 @@ const char* SettingsLongNames[16] = {
|
||||
/* Settings reset command */ "Reverte todos ajustes",
|
||||
/* Calibrate input voltage */ "Calibra a tensão e configura os botões. Mantenha presionado para sair",
|
||||
/* Advanced soldering screen enabled */ "Exibe informações avançadas durante o uso",
|
||||
/* Description Scroll Speed */ "Speed this text scrolls past at",
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "A ponta deve estar em temperatura ambiente antes de continuar!";
|
||||
@@ -995,6 +1213,9 @@ const char SettingRightChar = 'D';
|
||||
const char SettingLeftChar = 'C';
|
||||
const char SettingAutoChar = 'A';
|
||||
|
||||
const char SettingFastChar = 'F';
|
||||
const char SettingSlowChar = 'S';
|
||||
|
||||
const enum ShortNameType SettingsShortNameType = SHORT_NAME_SINGLE_LINE;
|
||||
const char* SettingsShortNames[16][2] = {
|
||||
// 1234567890
|
||||
@@ -1015,4 +1236,15 @@ const char* SettingsShortNames[16][2] = {
|
||||
/* (<= 8) Calibrate input voltage */ {"CAL.VOLT"},
|
||||
/* (<= 6) Advanced soldering screen enabled */ {"AVNCAD"},
|
||||
};
|
||||
const char* SettingsMenuEntries[4] = {
|
||||
/*Soldering Menu*/"Soldering\nSettings",
|
||||
/* Power Saving Menu*/"Sleep\nModes",
|
||||
/* UI Menu*/"User\nInterface",
|
||||
/* Advanced Menu*/"Advanced\nOptions", };
|
||||
const char* SettingsMenuEntriesDescriptions[4] ={
|
||||
"Soldering settings",
|
||||
"Power Saving Settings",
|
||||
"User Interface settings",
|
||||
"Advanced options"
|
||||
};
|
||||
#endif
|
||||
@@ -5,11 +5,14 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
#include "gui.h"
|
||||
#include "gui.hpp"
|
||||
#include "main.hpp"
|
||||
#include "cmsis_os.h"
|
||||
#include "hardware.h"
|
||||
#include "string.h"
|
||||
#include "Translation.h"
|
||||
|
||||
#include "string.h"
|
||||
extern uint32_t lastButtonTime;
|
||||
void gui_Menu(const menuitem* menu);
|
||||
static void settings_setInputVRange(void);
|
||||
static void settings_displayInputVRange(void);
|
||||
static void settings_setSleepTemp(void);
|
||||
@@ -26,6 +29,8 @@ static void settings_setAdvancedSolderingScreens(void);
|
||||
static void settings_displayAdvancedSolderingScreens(void);
|
||||
static void settings_setAdvancedIDLEScreens(void);
|
||||
static void settings_displayAdvancedIDLEScreens(void);
|
||||
static void settings_setScrollSpeed(void);
|
||||
static void settings_displayScrollSpeed(void);
|
||||
|
||||
static void settings_setDisplayRotation(void);
|
||||
static void settings_displayDisplayRotation(void);
|
||||
@@ -44,40 +49,153 @@ static void settings_displayCalibrate(void);
|
||||
static void settings_setCalibrateVIN(void);
|
||||
static void settings_displayCalibrateVIN(void);
|
||||
|
||||
const menuitem settingsMenu[] = {
|
||||
/*Struct used for all settings options in the settings menu*/
|
||||
{(const char*)SettingsLongNames[0], {settings_setInputVRange}, {settings_displayInputVRange}}, /*Voltage input*/
|
||||
{(const char*)SettingsLongNames[1], {settings_setSleepTemp}, {settings_displaySleepTemp}}, /*Sleep Temp*/
|
||||
{(const char*)SettingsLongNames[2], {settings_setSleepTime}, {settings_displaySleepTime}}, /*Sleep Time*/
|
||||
{(const char*)SettingsLongNames[3], {settings_setShutdownTime}, {settings_displayShutdownTime}}, /*Shutdown Time*/
|
||||
{(const char*)SettingsLongNames[4], {settings_setSensitivity}, {settings_displaySensitivity}}, /* Motion Sensitivity*/
|
||||
{(const char*)SettingsLongNames[5], {settings_setTempF}, {settings_displayTempF}}, /* Temperature units*/
|
||||
{(const char*)SettingsLongNames[6], {settings_setAdvancedIDLEScreens}, {settings_displayAdvancedIDLEScreens}}, /* Advanced idle screen*/
|
||||
{(const char*)SettingsLongNames[15], {settings_setAdvancedSolderingScreens}, {settings_displayAdvancedSolderingScreens}}, /* Advanced soldering screen*/
|
||||
{(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[14], {settings_setCalibrateVIN}, {settings_displayCalibrateVIN}}, /*Voltage input cal*/
|
||||
//reset is last menu item
|
||||
{(const char*)SettingsLongNames[13], {settings_setResetSettings}, {settings_displayResetSettings}}, /*Resets settings*/
|
||||
{NULL, {NULL}, {NULL}} // end of menu marker. DO NOT REMOVE
|
||||
//Menu functions
|
||||
static void settings_displaySolderingMenu(void);
|
||||
static void settings_enterSolderingMenu(void);
|
||||
static void settings_displayPowerMenu(void);
|
||||
static void settings_enterPowerMenu(void);
|
||||
static void settings_displayUIMenu(void);
|
||||
static void settings_enterUIMenu(void);
|
||||
static void settings_displayAdvancedMenu(void);
|
||||
static void settings_enterAdvancedMenu(void);
|
||||
/*
|
||||
* Root Settings Menu
|
||||
*
|
||||
* Power Source
|
||||
* Soldering
|
||||
* Boost Mode Enabled
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
*
|
||||
* Power Saving
|
||||
* Sleep Temp
|
||||
* Sleep Time
|
||||
* Shutdown Time
|
||||
* Motion Sensitivity
|
||||
*
|
||||
* UI
|
||||
* // Language
|
||||
* Scrolling Speed
|
||||
* Temperature Unit
|
||||
* Display orientation
|
||||
* Cooldown blink
|
||||
*
|
||||
* Advanced
|
||||
* Detailed IDLE
|
||||
* Detailed Soldering
|
||||
* Logo Time
|
||||
* Calibrate Temperature
|
||||
* Calibrate Input V
|
||||
* Reset Settings
|
||||
*
|
||||
*/
|
||||
const menuitem rootSettingsMenu[] {
|
||||
/*
|
||||
* Power Source
|
||||
* Soldering Menu
|
||||
* Power Saving Menu
|
||||
* UI Menu
|
||||
* Advanced Menu
|
||||
* Exit
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[0], { settings_setInputVRange }, {
|
||||
settings_displayInputVRange } }, /*Voltage input*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[0], {
|
||||
settings_enterSolderingMenu }, { settings_displaySolderingMenu } }, /*Soldering*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[1], { settings_enterPowerMenu },
|
||||
{ settings_displayPowerMenu } }, /*Sleep Options Menu*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[2], { settings_enterUIMenu }, {
|
||||
settings_displayUIMenu } }, /*UI Menu*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[3],
|
||||
{ settings_enterAdvancedMenu }, { settings_displayAdvancedMenu } }, /*Advanced Menu*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
const menuitem solderingMenu[] = {
|
||||
/*
|
||||
* Boost Mode Enabled
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[8], { settings_setBoostModeEnabled }, {
|
||||
settings_displayBoostModeEnabled } }, /*Enable Boost*/
|
||||
{ (const char*) SettingsDescriptions[9], { settings_setBoostTemp }, {
|
||||
settings_displayBoostTemp } }, /*Boost Temp*/
|
||||
{ (const char*) SettingsDescriptions[10], { settings_setAutomaticStartMode }, {
|
||||
settings_displayAutomaticStartMode } }, /*Auto start*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem UIMenu[] = {
|
||||
/*
|
||||
// Language
|
||||
* Scrolling Speed
|
||||
* Temperature Unit
|
||||
* Display orientation
|
||||
* Cooldown blink
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[5], { settings_setTempF }, {
|
||||
settings_displayTempF } }, /* Temperature units*/
|
||||
{ (const char*) SettingsDescriptions[7], { settings_setDisplayRotation }, {
|
||||
settings_displayDisplayRotation } }, /*Display Rotation*/
|
||||
{ (const char*) SettingsDescriptions[11], { settings_setCoolingBlinkEnabled }, {
|
||||
settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
||||
{ (const char*) SettingsDescriptions[16], { settings_setScrollSpeed }, {
|
||||
settings_displayScrollSpeed } }, /*Scroll Speed for descriptions*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem PowerMenu[] = {
|
||||
/*
|
||||
* Sleep Temp
|
||||
* Sleep Time
|
||||
* Shutdown Time
|
||||
* Motion Sensitivity
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[1], { settings_setSleepTemp }, {
|
||||
settings_displaySleepTemp } }, /*Sleep Temp*/
|
||||
{ (const char*) SettingsDescriptions[2], { settings_setSleepTime }, {
|
||||
settings_displaySleepTime } }, /*Sleep Time*/
|
||||
{ (const char*) SettingsDescriptions[3], { settings_setShutdownTime }, {
|
||||
settings_displayShutdownTime } }, /*Shutdown Time*/
|
||||
{ (const char*) SettingsDescriptions[4], { settings_setSensitivity }, {
|
||||
settings_displaySensitivity } }, /* Motion Sensitivity*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem advancedMenu[] = {
|
||||
|
||||
/*
|
||||
* Detailed IDLE
|
||||
* Detailed Soldering
|
||||
* Logo Time
|
||||
* Calibrate Temperature
|
||||
* Calibrate Input V
|
||||
* Reset Settings
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[6], { settings_setAdvancedIDLEScreens }, {
|
||||
settings_displayAdvancedIDLEScreens } }, /* Advanced idle screen*/
|
||||
{ (const char*) SettingsDescriptions[15],
|
||||
{ settings_setAdvancedSolderingScreens }, {
|
||||
settings_displayAdvancedSolderingScreens } }, /* Advanced soldering screen*/
|
||||
{ (const char*) SettingsDescriptions[13], { settings_setResetSettings }, {
|
||||
settings_displayResetSettings } }, /*Resets settings*/
|
||||
{ (const char*) SettingsDescriptions[12], { settings_setCalibrate }, {
|
||||
settings_displayCalibrate } }, /*Calibrate tip*/
|
||||
{ (const char*) SettingsDescriptions[14], { settings_setCalibrateVIN }, {
|
||||
settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
}
|
||||
|
||||
static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
||||
lcd.setFont(1);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
lcd.setCharCursor(0, 1);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][1]);
|
||||
lcd.setFont(1);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
lcd.setCharCursor(0, 1);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][1]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,17 +206,17 @@ static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
||||
* description.
|
||||
*/
|
||||
static void printShortDescription(uint32_t shortDescIndex,
|
||||
uint16_t cursorCharPosition) {
|
||||
// print short description (default single line, explicit double line)
|
||||
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
||||
printShortDescriptionDoubleLine(shortDescIndex);
|
||||
} else {
|
||||
printShortDescriptionSingleLine(shortDescIndex);
|
||||
}
|
||||
uint16_t cursorCharPosition) {
|
||||
// print short description (default single line, explicit double line)
|
||||
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
||||
printShortDescriptionDoubleLine(shortDescIndex);
|
||||
} else {
|
||||
printShortDescriptionSingleLine(shortDescIndex);
|
||||
}
|
||||
|
||||
// prepare cursor for value
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(cursorCharPosition, 0);
|
||||
// prepare cursor for value
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(cursorCharPosition, 0);
|
||||
}
|
||||
|
||||
static int userConfirmation(const char* message) {
|
||||
@@ -152,286 +270,435 @@ static int userConfirmation(const char* message) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void settings_setInputVRange(void) {
|
||||
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
|
||||
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
|
||||
}
|
||||
|
||||
static void settings_displayInputVRange(void) {
|
||||
printShortDescription(0, 6);
|
||||
printShortDescription(0, 6);
|
||||
|
||||
if (systemSettings.cutoutSetting) {
|
||||
lcd.drawChar('0' + 2 + systemSettings.cutoutSetting);
|
||||
lcd.drawChar('S');
|
||||
} else {
|
||||
lcd.print("DC");
|
||||
}
|
||||
if (systemSettings.cutoutSetting) {
|
||||
lcd.drawChar('0' + 2 + systemSettings.cutoutSetting);
|
||||
lcd.drawChar('S');
|
||||
} else {
|
||||
lcd.print("DC");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void settings_setSleepTemp(void) {
|
||||
systemSettings.SleepTemp += 10;
|
||||
if (systemSettings.SleepTemp > 300) systemSettings.SleepTemp = 50;
|
||||
systemSettings.SleepTemp += 10;
|
||||
if (systemSettings.SleepTemp > 300)
|
||||
systemSettings.SleepTemp = 50;
|
||||
}
|
||||
|
||||
static void settings_displaySleepTemp(void) {
|
||||
printShortDescription(1, 5);
|
||||
lcd.printNumber(systemSettings.SleepTemp, 3);
|
||||
printShortDescription(1, 5);
|
||||
lcd.printNumber(systemSettings.SleepTemp, 3);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setSleepTime(void) {
|
||||
systemSettings.SleepTime++; // Go up 1 minute at a time
|
||||
if (systemSettings.SleepTime >= 16) {
|
||||
systemSettings.SleepTime = 1; // can't set time over 10 mins
|
||||
}
|
||||
// Remember that ^ is the time of no movement
|
||||
systemSettings.SleepTime++; // Go up 1 minute at a time
|
||||
if (systemSettings.SleepTime >= 16) {
|
||||
systemSettings.SleepTime = 1; // can't set time over 10 mins
|
||||
}
|
||||
// Remember that ^ is the time of no movement
|
||||
}
|
||||
|
||||
static void settings_displaySleepTime(void) {
|
||||
printShortDescription(2, 5);
|
||||
printShortDescription(2, 5);
|
||||
|
||||
if (systemSettings.SleepTime < 6) {
|
||||
lcd.printNumber(systemSettings.SleepTime * 10, 2);
|
||||
lcd.drawChar('S');
|
||||
} else {
|
||||
lcd.printNumber(systemSettings.SleepTime - 5, 2);
|
||||
lcd.drawChar('M');
|
||||
}
|
||||
if (systemSettings.SleepTime < 6) {
|
||||
lcd.printNumber(systemSettings.SleepTime * 10, 2);
|
||||
lcd.drawChar('S');
|
||||
} else {
|
||||
lcd.printNumber(systemSettings.SleepTime - 5, 2);
|
||||
lcd.drawChar('M');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void settings_setShutdownTime(void) {
|
||||
systemSettings.ShutdownTime++;
|
||||
if (systemSettings.ShutdownTime > 60) {
|
||||
systemSettings.ShutdownTime = 0; // wrap to off
|
||||
}
|
||||
systemSettings.ShutdownTime++;
|
||||
if (systemSettings.ShutdownTime > 60) {
|
||||
systemSettings.ShutdownTime = 0; // wrap to off
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayShutdownTime(void) {
|
||||
printShortDescription(3, 6);
|
||||
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
||||
printShortDescription(3, 6);
|
||||
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setTempF(void) {
|
||||
systemSettings.temperatureInF = !systemSettings.temperatureInF;
|
||||
systemSettings.temperatureInF = !systemSettings.temperatureInF;
|
||||
}
|
||||
|
||||
static void settings_displayTempF(void) {
|
||||
printShortDescription(5, 7);
|
||||
printShortDescription(5, 7);
|
||||
|
||||
lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C');
|
||||
lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C');
|
||||
}
|
||||
|
||||
|
||||
static void settings_setSensitivity(void) {
|
||||
systemSettings.sensitivity++;
|
||||
systemSettings.sensitivity = systemSettings.sensitivity % 10;
|
||||
systemSettings.sensitivity++;
|
||||
systemSettings.sensitivity = systemSettings.sensitivity % 10;
|
||||
}
|
||||
|
||||
static void settings_displaySensitivity(void) {
|
||||
printShortDescription(4, 7);
|
||||
lcd.printNumber(systemSettings.sensitivity, 1);
|
||||
printShortDescription(4, 7);
|
||||
lcd.printNumber(systemSettings.sensitivity, 1);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setAdvancedSolderingScreens(void) {
|
||||
systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
|
||||
systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
|
||||
}
|
||||
|
||||
static void settings_displayAdvancedSolderingScreens(void) {
|
||||
printShortDescription(15, 7);
|
||||
printShortDescription(15, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.detailedSoldering);
|
||||
lcd.drawCheckbox(systemSettings.detailedSoldering);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setAdvancedIDLEScreens(void) {
|
||||
systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
|
||||
systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
|
||||
}
|
||||
|
||||
static void settings_displayAdvancedIDLEScreens(void) {
|
||||
printShortDescription(6, 7);
|
||||
printShortDescription(6, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.detailedIDLE);
|
||||
lcd.drawCheckbox(systemSettings.detailedIDLE);
|
||||
}
|
||||
static void settings_setScrollSpeed(void) {
|
||||
|
||||
if (systemSettings.descriptionScrollSpeed == 0)
|
||||
systemSettings.descriptionScrollSpeed = 1;
|
||||
else
|
||||
systemSettings.descriptionScrollSpeed = 0;
|
||||
}
|
||||
static void settings_displayScrollSpeed(void) {
|
||||
printShortDescription(16, 7);
|
||||
lcd.drawChar(
|
||||
(systemSettings.descriptionScrollSpeed) ?
|
||||
SettingFastChar : SettingSlowChar);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setDisplayRotation(void) {
|
||||
systemSettings.OrientationMode++;
|
||||
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
||||
systemSettings.OrientationMode++;
|
||||
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
||||
}
|
||||
|
||||
static void settings_displayDisplayRotation(void) {
|
||||
printShortDescription(7, 7);
|
||||
printShortDescription(7, 7);
|
||||
|
||||
switch (systemSettings.OrientationMode) {
|
||||
case 0:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
case 1:
|
||||
lcd.drawChar(SettingLeftChar);
|
||||
break;
|
||||
case 2:
|
||||
lcd.drawChar(SettingAutoChar);
|
||||
break;
|
||||
default:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
}
|
||||
switch (systemSettings.OrientationMode) {
|
||||
case 0:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
case 1:
|
||||
lcd.drawChar(SettingLeftChar);
|
||||
break;
|
||||
case 2:
|
||||
lcd.drawChar(SettingAutoChar);
|
||||
break;
|
||||
default:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void settings_setBoostModeEnabled(void) {
|
||||
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
|
||||
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
|
||||
}
|
||||
|
||||
static void settings_displayBoostModeEnabled(void) {
|
||||
printShortDescription(8, 7);
|
||||
printShortDescription(8, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.boostModeEnabled);
|
||||
lcd.drawCheckbox(systemSettings.boostModeEnabled);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setBoostTemp(void) {
|
||||
systemSettings.BoostTemp += 10; // Go up 10 at a time
|
||||
if (systemSettings.temperatureInF) {
|
||||
if (systemSettings.BoostTemp > 850) {
|
||||
systemSettings.BoostTemp = 480; // loop back at 250
|
||||
}
|
||||
} else {
|
||||
if (systemSettings.BoostTemp > 450) {
|
||||
systemSettings.BoostTemp = 250; // loop back at 250
|
||||
}
|
||||
}
|
||||
systemSettings.BoostTemp += 10; // Go up 10 at a time
|
||||
if (systemSettings.temperatureInF) {
|
||||
if (systemSettings.BoostTemp > 850) {
|
||||
systemSettings.BoostTemp = 480; // loop back at 250
|
||||
}
|
||||
} else {
|
||||
if (systemSettings.BoostTemp > 450) {
|
||||
systemSettings.BoostTemp = 250; // loop back at 250
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayBoostTemp(void) {
|
||||
printShortDescription(9, 5);
|
||||
lcd.printNumber(systemSettings.BoostTemp, 3);
|
||||
printShortDescription(9, 5);
|
||||
lcd.printNumber(systemSettings.BoostTemp, 3);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setAutomaticStartMode(void) {
|
||||
systemSettings.autoStartMode++;
|
||||
systemSettings.autoStartMode %= 2;
|
||||
systemSettings.autoStartMode++;
|
||||
systemSettings.autoStartMode %= 2;
|
||||
}
|
||||
|
||||
static void settings_displayAutomaticStartMode(void) {
|
||||
printShortDescription(10, 7);
|
||||
printShortDescription(10, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.autoStartMode);
|
||||
lcd.drawCheckbox(systemSettings.autoStartMode);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setCoolingBlinkEnabled(void) {
|
||||
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
|
||||
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
|
||||
}
|
||||
|
||||
static void settings_displayCoolingBlinkEnabled(void) {
|
||||
printShortDescription(11, 7);
|
||||
printShortDescription(11, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.coolingTempBlink);
|
||||
lcd.drawCheckbox(systemSettings.coolingTempBlink);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setResetSettings(void) {
|
||||
if(userConfirmation(SettingsResetWarning)) {
|
||||
resetSettings();
|
||||
if (userConfirmation(SettingsResetWarning)) {
|
||||
resetSettings();
|
||||
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("RESET OK");
|
||||
lcd.refresh();
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("RESET OK");
|
||||
lcd.refresh();
|
||||
|
||||
waitForButtonPressOrTimeout(200);
|
||||
}
|
||||
waitForButtonPressOrTimeout(200);
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayResetSettings(void) {
|
||||
printShortDescription(13, 7);
|
||||
printShortDescription(13, 7);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setCalibrate(void) {
|
||||
if(userConfirmation(SettingsCalibrationWarning)) {
|
||||
//User confirmed
|
||||
//So we now perform the actual calculation
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(".....");
|
||||
lcd.refresh();
|
||||
if (userConfirmation(SettingsCalibrationWarning)) {
|
||||
//User confirmed
|
||||
//So we now perform the actual calculation
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(".....");
|
||||
lcd.refresh();
|
||||
|
||||
setCalibrationOffset(0); //turn off the current offset
|
||||
for (uint8_t i = 0; i < 20; i++) {
|
||||
getTipRawTemp(1); //cycle through the filter a fair bit to ensure we're stable.
|
||||
osDelay(20);
|
||||
}
|
||||
osDelay(100);
|
||||
setCalibrationOffset(0); //turn off the current offset
|
||||
for (uint8_t i = 0; i < 20; i++) {
|
||||
getTipRawTemp(1); //cycle through the filter a fair bit to ensure we're stable.
|
||||
osDelay(20);
|
||||
}
|
||||
osDelay(100);
|
||||
|
||||
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
||||
//We now measure the current reported tip temperature
|
||||
uint16_t handleTempC = getHandleTemperature() / 10;
|
||||
//We now have an error between these that we want to store as the offset
|
||||
rawTempC = rawTempC - handleTempC;
|
||||
systemSettings.CalibrationOffset = rawTempC;
|
||||
setCalibrationOffset(rawTempC); //store the error
|
||||
osDelay(100);
|
||||
}
|
||||
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
||||
//We now measure the current reported tip temperature
|
||||
uint16_t handleTempC = getHandleTemperature() / 10;
|
||||
//We now have an error between these that we want to store as the offset
|
||||
rawTempC = rawTempC - handleTempC;
|
||||
systemSettings.CalibrationOffset = rawTempC;
|
||||
setCalibrationOffset(rawTempC); //store the error
|
||||
osDelay(100);
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayCalibrate(void) {
|
||||
printShortDescription(12, 5);
|
||||
printShortDescription(12, 5);
|
||||
}
|
||||
|
||||
|
||||
static void settings_setCalibrateVIN(void) {
|
||||
// Jump to the voltage calibration subscreen
|
||||
lcd.setFont(0);
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
// Jump to the voltage calibration subscreen
|
||||
lcd.setFont(0);
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
|
||||
for (;;) {
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||
lcd.print(".");
|
||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
|
||||
lcd.print("V");
|
||||
for (;;) {
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||
lcd.print(".");
|
||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) % 10, 1);
|
||||
lcd.print("V");
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
switch (buttons) {
|
||||
case BUTTON_F_SHORT:
|
||||
systemSettings.voltageDiv++;
|
||||
break;
|
||||
ButtonState buttons = getButtonState();
|
||||
switch (buttons) {
|
||||
case BUTTON_F_SHORT:
|
||||
systemSettings.voltageDiv++;
|
||||
break;
|
||||
|
||||
case BUTTON_B_SHORT:
|
||||
systemSettings.voltageDiv--;
|
||||
break;
|
||||
case BUTTON_B_SHORT:
|
||||
systemSettings.voltageDiv--;
|
||||
break;
|
||||
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
saveSettings();
|
||||
return;
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
saveSettings();
|
||||
return;
|
||||
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
lcd.refresh();
|
||||
osDelay(50);
|
||||
lcd.refresh();
|
||||
osDelay(50);
|
||||
|
||||
// Cap to sensible values
|
||||
if (systemSettings.voltageDiv < 90) {
|
||||
systemSettings.voltageDiv = 90;
|
||||
} else if (systemSettings.voltageDiv > 130) {
|
||||
systemSettings.voltageDiv = 130;
|
||||
}
|
||||
}
|
||||
// Cap to sensible values
|
||||
if (systemSettings.voltageDiv < 90) {
|
||||
systemSettings.voltageDiv = 90;
|
||||
} else if (systemSettings.voltageDiv > 130) {
|
||||
systemSettings.voltageDiv = 130;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayCalibrateVIN(void) {
|
||||
printShortDescription(14, 5);
|
||||
printShortDescription(14, 5);
|
||||
}
|
||||
static void settings_displaySolderingMenu(void) {
|
||||
//Call into the menu
|
||||
lcd.setFont(1);
|
||||
lcd.setCursor(0, 0);
|
||||
//Draw title
|
||||
lcd.print(SettingsMenuEntries[0]);
|
||||
//Draw symbol
|
||||
//16 pixel wide image
|
||||
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 0]));
|
||||
}
|
||||
static void settings_enterSolderingMenu(void) {
|
||||
gui_Menu(solderingMenu);
|
||||
}
|
||||
static void settings_displayPowerMenu(void) {
|
||||
lcd.setFont(1);
|
||||
lcd.setCursor(0, 0);
|
||||
//Draw title
|
||||
lcd.print(SettingsMenuEntries[1]);
|
||||
//Draw symbol
|
||||
//16 pixel wide image
|
||||
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 1]));
|
||||
}
|
||||
static void settings_enterPowerMenu(void) {
|
||||
gui_Menu(PowerMenu);
|
||||
}
|
||||
static void settings_displayUIMenu(void) {
|
||||
lcd.setFont(1);
|
||||
lcd.setCursor(0, 0);
|
||||
//Draw title
|
||||
lcd.print(SettingsMenuEntries[2]);
|
||||
//Draw symbol
|
||||
//16 pixel wide image
|
||||
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 2]));
|
||||
}
|
||||
static void settings_enterUIMenu(void) {
|
||||
gui_Menu(UIMenu);
|
||||
}
|
||||
static void settings_displayAdvancedMenu(void) {
|
||||
lcd.setFont(1);
|
||||
lcd.setCursor(0, 0);
|
||||
//Draw title
|
||||
lcd.print(SettingsMenuEntries[3]);
|
||||
//Draw symbol
|
||||
//16 pixel wide image
|
||||
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * 3]));
|
||||
|
||||
}
|
||||
static void settings_enterAdvancedMenu(void) {
|
||||
gui_Menu(advancedMenu);
|
||||
}
|
||||
|
||||
void gui_Menu(const menuitem* menu) {
|
||||
// Draw the settings menu and provide iteration support etc
|
||||
uint8_t currentScreen = 0;
|
||||
uint32_t autoRepeatTimer = 0;
|
||||
bool earlyExit = false;
|
||||
uint32_t descriptionStart = 0;
|
||||
int16_t lastOffset = -1;
|
||||
bool lcdRefresh = true;
|
||||
|
||||
// lower the value - higher the speed
|
||||
int16_t descriptionWidth = FONT_12_WIDTH
|
||||
* (strlen(menu[currentScreen].description) + 7);
|
||||
|
||||
while ((menu[currentScreen].draw.func != NULL) && earlyExit == false) {
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
//If the user has hesitated for >=3 seconds, show the long text
|
||||
//Otherwise "draw" the option
|
||||
if (xTaskGetTickCount() - lastButtonTime < 300) {
|
||||
lcd.clearScreen();
|
||||
menu[currentScreen].draw.func();
|
||||
lastOffset = -1;
|
||||
lcdRefresh = true;
|
||||
} else {
|
||||
// Draw description
|
||||
if (descriptionStart == 0)
|
||||
descriptionStart = xTaskGetTickCount();
|
||||
|
||||
int16_t descriptionOffset = ((xTaskGetTickCount() - descriptionStart)
|
||||
/ (systemSettings.descriptionScrollSpeed == 1?1:2));
|
||||
descriptionOffset %= descriptionWidth;//Roll around at the end
|
||||
|
||||
if (lastOffset != descriptionOffset) {
|
||||
lcd.clearScreen();
|
||||
|
||||
//^ Rolling offset based on time
|
||||
lcd.setCursor((OLED_WIDTH - descriptionOffset), 0);
|
||||
lcd.print(menu[currentScreen].description);
|
||||
lastOffset = descriptionOffset;
|
||||
lcdRefresh = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
|
||||
switch (buttons) {
|
||||
case BUTTON_BOTH:
|
||||
earlyExit = true; // will make us exit next loop
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
// increment
|
||||
if (descriptionStart == 0) {
|
||||
if (menu[currentScreen].incrementHandler.func != NULL)
|
||||
menu[currentScreen].incrementHandler.func();
|
||||
else
|
||||
earlyExit = true;
|
||||
} else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_B_SHORT:
|
||||
if (descriptionStart == 0)
|
||||
currentScreen++;
|
||||
else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
//#TODO: Impliment ramping change
|
||||
case BUTTON_F_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer > 30) {
|
||||
menu[currentScreen].incrementHandler.func();
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
}
|
||||
break;
|
||||
case BUTTON_B_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer > 30) {
|
||||
currentScreen++;
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
}
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (lcdRefresh) {
|
||||
lcd.refresh(); // update the LCD
|
||||
osDelay(20);
|
||||
lcdRefresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void enterSettingsMenu() {
|
||||
gui_Menu(rootSettingsMenu); //Call the root menu
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include "Settings.h"
|
||||
#include "Translation.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "gui.h"
|
||||
#include "stdlib.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "string.h"
|
||||
#include "LIS2DH12.hpp"
|
||||
#include <gui.hpp>
|
||||
|
||||
#define ACCELDEBUG 0
|
||||
// C++ objects
|
||||
@@ -325,102 +325,8 @@ static void gui_solderingTempAdjust() {
|
||||
GUIDelay();
|
||||
}
|
||||
}
|
||||
static void gui_settingsMenu() {
|
||||
// Draw the settings menu and provide iteration support etc
|
||||
uint8_t currentScreen = 0;
|
||||
uint32_t autoRepeatTimer = 0;
|
||||
bool earlyExit = false;
|
||||
uint32_t descriptionStart = 0;
|
||||
int16_t lastOffset = -1;
|
||||
bool lcdRefresh = true;
|
||||
|
||||
// TODO Scrolling speed factor can be moved to User Interface settings
|
||||
uint16_t scrollingSpeedFactor = 4; // lower the value - higher the speed
|
||||
|
||||
while ((settingsMenu[currentScreen].incrementHandler.func != NULL)
|
||||
&& earlyExit == false) {
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
|
||||
if (xTaskGetTickCount() - lastButtonTime < 400) {
|
||||
lcd.clearScreen();
|
||||
|
||||
settingsMenu[currentScreen].draw.func();
|
||||
lastOffset = -1;
|
||||
lcdRefresh = true;
|
||||
} else {
|
||||
// Draw description
|
||||
// draw string starting from descriptionOffset
|
||||
int16_t descriptionWidth = FONT_12_WIDTH
|
||||
* (strlen(settingsMenu[currentScreen].description) + 7);
|
||||
if (descriptionStart == 0)
|
||||
descriptionStart = HAL_GetTick();
|
||||
|
||||
int16_t descriptionOffset =
|
||||
(int) ((HAL_GetTick() - descriptionStart)
|
||||
/ (float) scrollingSpeedFactor + 0.5)
|
||||
% descriptionWidth;
|
||||
|
||||
if (lastOffset != descriptionOffset) {
|
||||
lcd.clearScreen();
|
||||
|
||||
//^ Rolling offset based on time
|
||||
lcd.setCursor((OLED_WIDTH - descriptionOffset), 0);
|
||||
lcd.print(settingsMenu[currentScreen].description);
|
||||
lastOffset = descriptionOffset;
|
||||
lcdRefresh = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
|
||||
switch (buttons) {
|
||||
case BUTTON_BOTH:
|
||||
earlyExit = true; // will make us exit next loop
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
// increment
|
||||
if (descriptionStart == 0)
|
||||
settingsMenu[currentScreen].incrementHandler.func();
|
||||
else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_B_SHORT:
|
||||
if (descriptionStart == 0)
|
||||
currentScreen++;
|
||||
else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer > 30) {
|
||||
settingsMenu[currentScreen].incrementHandler.func();
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
}
|
||||
break;
|
||||
case BUTTON_B_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer > 30) {
|
||||
currentScreen++;
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
}
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (lcdRefresh) {
|
||||
lcd.refresh(); // update the LCD
|
||||
osDelay(20);
|
||||
lcdRefresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
static int gui_showTipTempWarning() {
|
||||
for (;;) {
|
||||
@@ -775,7 +681,7 @@ void startGUITask(void const *argument) {
|
||||
ticks = xTaskGetTickCount();
|
||||
ButtonState buttons = getButtonState();
|
||||
if (buttons)
|
||||
ticks = xTaskGetTickCount();//make timeout now so we will exit
|
||||
ticks = xTaskGetTickCount(); //make timeout now so we will exit
|
||||
GUIDelay();
|
||||
}
|
||||
|
||||
@@ -835,7 +741,7 @@ void startGUITask(void const *argument) {
|
||||
case BUTTON_B_SHORT:
|
||||
lcd.setFont(0);
|
||||
lcd.displayOnOff(true); // turn lcd on
|
||||
gui_settingsMenu(); // enter the settings menu
|
||||
enterSettingsMenu(); // enter the settings menu
|
||||
saveSettings();
|
||||
setCalibrationOffset(systemSettings.CalibrationOffset); // ensure cal offset is applied
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user