Merge pull request #876 from devydd/power_pulse_more_config
Add user-adjustable Power Pulse's duration and delay (rate) settings
This commit is contained in:
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Czas między",
|
||||
"imp. mocy"
|
||||
],
|
||||
"desc": "Czas między kolejnymi impulsami mocy zapobiegającymi usypianiu powerbanku (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Długość",
|
||||
"impulsu mocy"
|
||||
],
|
||||
"desc": "Długość impulsu mocy zapobiegającego usypianiu powerbanku (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"анимации"
|
||||
],
|
||||
"desc": "Скорость анимации иконок в главном меню <Милисекунды> <О=Отключено, Н=Низкий, С=Средний, В=Высокий>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,6 +322,20 @@
|
||||
"speed"
|
||||
],
|
||||
"desc": "Speed of icon animations in menu <O=off | L=low | M=medium | H=high>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,6 +304,20 @@
|
||||
"анімації"
|
||||
],
|
||||
"desc": "Швидкість анімації іконок у головному меню <Мілісекунди> <В=Вимк, Н=Низькa, С=Середня, М=Макс>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait before triggering every keep-awake pulse (x 2.5s)"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration (x 250ms)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,20 @@
|
||||
"動畫速度"
|
||||
],
|
||||
"desc": "功能表圖示動畫嘅速度 <關=不顯示動畫 | 慢=慢速 | 中=中速 | 快=快速>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait beFore triggering everY power pulse <in 2.5s>"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "power pulse duration <in 250ms>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,6 +305,20 @@
|
||||
"動畫速度"
|
||||
],
|
||||
"desc": "功能表圖示動畫的速度 <關=不顯示動畫 | 慢=慢速 | 中=中速 | 快=快速>"
|
||||
},
|
||||
"PowerPulseWait": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"wait time"
|
||||
],
|
||||
"desc": "Time to wait beFore triggering every keep-awake pulse <x 2.5s>"
|
||||
},
|
||||
"PowerPulseDuration": {
|
||||
"text2": [
|
||||
"Power pulse",
|
||||
"duration"
|
||||
],
|
||||
"desc": "Keep-awake-pulse duration <x 250ms>"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,6 +376,16 @@ var def =
|
||||
"id": "AnimSpeed",
|
||||
"maxLen": 6,
|
||||
"maxLen2": 13
|
||||
},
|
||||
{
|
||||
"id": "PowerPulseWait",
|
||||
"maxLen": 6,
|
||||
"maxLen2": 13
|
||||
},
|
||||
{
|
||||
"id": "PowerPulseDuration",
|
||||
"maxLen": 6,
|
||||
"maxLen2": 13
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#ifndef SETTINGS_H_
|
||||
#define SETTINGS_H_
|
||||
#include <stdint.h>
|
||||
#define SETTINGSVERSION (0x28)
|
||||
#define SETTINGSVERSION (0x29)
|
||||
/*Change this if you change the struct below to prevent people getting \
|
||||
out of sync*/
|
||||
|
||||
@@ -43,6 +43,8 @@ typedef struct {
|
||||
uint8_t descriptionScrollSpeed : 1; // Description scroll speed
|
||||
uint8_t lockingMode : 2; // Store the locking mode
|
||||
uint8_t KeepAwakePulse; // Keep Awake pulse power in 0.1 watts (10 = 1Watt)
|
||||
uint8_t KeepAwakePulseWait; // Time between Keep Awake pulses in 2500 ms = 2.5 s increments
|
||||
uint8_t KeepAwakePulseDuration; // Duration of the Keep Awake pusle in 250 ms increments
|
||||
|
||||
uint16_t voltageDiv; // Voltage divisor factor
|
||||
uint16_t BoostTemp; // Boost mode set point for the iron
|
||||
|
||||
@@ -12,8 +12,8 @@ extern const uint8_t USER_FONT_12[];
|
||||
extern const uint8_t USER_FONT_6x8[];
|
||||
extern const bool HasFahrenheit;
|
||||
|
||||
extern const char *SettingsShortNames[31][2];
|
||||
extern const char *SettingsDescriptions[31];
|
||||
extern const char *SettingsShortNames[33][2];
|
||||
extern const char *SettingsDescriptions[33];
|
||||
extern const char *SettingsMenuEntries[5];
|
||||
|
||||
extern const char *SettingsCalibrationDone;
|
||||
|
||||
@@ -77,7 +77,9 @@ void resetSettings() {
|
||||
systemSettings.ReverseButtonTempChangeEnabled = REVERSE_BUTTON_TEMP_CHANGE; //
|
||||
systemSettings.TempChangeShortStep = TEMP_CHANGE_SHORT_STEP; //
|
||||
systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; //
|
||||
systemSettings.KeepAwakePulse = POWER_PULSE_DEFAULT;
|
||||
systemSettings.KeepAwakePulse = POWER_PULSE_DEFAULT; // Power of the power pulse
|
||||
systemSettings.KeepAwakePulseWait = POWER_PULSE_WAIT_DEFAULT; // Time between Keep Awake pulses in 2.5 second increments
|
||||
systemSettings.KeepAwakePulseDuration = POWER_PULSE_DURATION_DEFAULT; // Duration of the Keep Awake pusle in 250ms increments
|
||||
systemSettings.hallEffectSensitivity = 1;
|
||||
systemSettings.accelMissingWarningCounter = 0;
|
||||
systemSettings.pdMissingWarningCounter = 0;
|
||||
|
||||
@@ -74,6 +74,10 @@ static void settings_displayAnimationSpeed(void);
|
||||
static bool settings_setAnimationSpeed(void);
|
||||
static void settings_displayAnimationLoop(void);
|
||||
static bool settings_setAnimationLoop(void);
|
||||
static void settings_displayPowerPulseWait(void);
|
||||
static bool settings_setPowerPulseWait(void);
|
||||
static void settings_displayPowerPulseDuration(void);
|
||||
static bool settings_setPowerPulseDuration(void);
|
||||
#ifdef HALL_SENSOR
|
||||
static void settings_displayHallEffect(void);
|
||||
static bool settings_setHallEffect(void);
|
||||
@@ -221,6 +225,8 @@ const menuitem advancedMenu[] = {
|
||||
* Power Pulse
|
||||
* Animation Loop
|
||||
* Animation Speed
|
||||
* Power Pulse Wait
|
||||
* Power Pulse Duration
|
||||
*/
|
||||
{(const char *)SettingsDescriptions[20], settings_setPowerLimit, settings_displayPowerLimit}, /*Power limit*/
|
||||
{(const char *)SettingsDescriptions[6], settings_setAdvancedIDLEScreens, settings_displayAdvancedIDLEScreens}, /* Advanced idle screen*/
|
||||
@@ -229,6 +235,8 @@ const menuitem advancedMenu[] = {
|
||||
{(const char *)SettingsDescriptions[11], settings_setCalibrate, settings_displayCalibrate}, /*Calibrate tip*/
|
||||
{(const char *)SettingsDescriptions[13], settings_setCalibrateVIN, settings_displayCalibrateVIN}, /*Voltage input cal*/
|
||||
{(const char *)SettingsDescriptions[24], settings_setPowerPulse, settings_displayPowerPulse}, /*Power Pulse adjustment */
|
||||
{(const char *)SettingsDescriptions[31], settings_setPowerPulseWait, settings_displayPowerPulseWait}, /*Power Pulse Wait adjustment*/
|
||||
{(const char *)SettingsDescriptions[32], settings_setPowerPulseDuration, settings_displayPowerPulseDuration}, /*Power Pulse Duration adjustment*/
|
||||
//{ (const char *) SettingsDescriptions[25], settings_setTipGain, settings_displayTipGain }, /*TipGain*/
|
||||
{NULL, NULL, NULL} // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
@@ -936,6 +944,45 @@ static void settings_displayAnimationSpeed(void) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static bool settings_setPowerPulseWait(void) {
|
||||
// Constrain to range 1 to POWER_PULSE_WAIT_MAX inclusive
|
||||
auto &wait = systemSettings.KeepAwakePulseWait;
|
||||
if (++wait > POWER_PULSE_WAIT_MAX) {
|
||||
wait = 1;
|
||||
}
|
||||
|
||||
return wait == POWER_PULSE_WAIT_MAX;
|
||||
}
|
||||
|
||||
static void settings_displayPowerPulseWait(void) {
|
||||
printShortDescription(31, 7);
|
||||
if (systemSettings.KeepAwakePulse) {
|
||||
OLED::printNumber(systemSettings.KeepAwakePulseWait, 1);
|
||||
} else {
|
||||
OLED::print(SymbolMinus);
|
||||
}
|
||||
}
|
||||
|
||||
static bool settings_setPowerPulseDuration(void) {
|
||||
// Constrain to range 1 to POWER_PULSE_DURATION_MAX inclusive
|
||||
auto &duration = systemSettings.KeepAwakePulseDuration;
|
||||
if (++duration > POWER_PULSE_DURATION_MAX) {
|
||||
duration = 1;
|
||||
}
|
||||
|
||||
return duration == POWER_PULSE_DURATION_MAX;
|
||||
}
|
||||
|
||||
static void settings_displayPowerPulseDuration(void) {
|
||||
printShortDescription(32, 7);
|
||||
if (systemSettings.KeepAwakePulse) {
|
||||
OLED::printNumber(systemSettings.KeepAwakePulseDuration, 1);
|
||||
} else {
|
||||
OLED::print(SymbolMinus);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HALL_SENSOR
|
||||
static void settings_displayHallEffect(void) {
|
||||
printShortDescription(26, 7);
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
#include "main.hpp"
|
||||
#include "power.hpp"
|
||||
#include "task.h"
|
||||
static TickType_t powerPulseRate = 10 * TICKS_SECOND;
|
||||
static TickType_t powerPulseDuration = 3 * TICKS_100MS;
|
||||
TaskHandle_t pidTaskNotification = NULL;
|
||||
uint32_t currentTempTargetDegC = 0; // Current temperature target in C
|
||||
static TickType_t powerPulseWaitUnit = 25 * TICKS_100MS; // 2.5 s
|
||||
static TickType_t powerPulseDurationUnit = (5 * TICKS_100MS) / 2; // 250 ms
|
||||
TaskHandle_t pidTaskNotification = NULL;
|
||||
uint32_t currentTempTargetDegC = 0; // Current temperature target in C
|
||||
|
||||
/* StartPIDTask function */
|
||||
void startPIDTask(void const *argument __unused) {
|
||||
@@ -92,10 +92,11 @@ void startPIDTask(void const *argument __unused) {
|
||||
}
|
||||
// If the user turns on the option of using an occasional pulse to keep the power bank on
|
||||
if (systemSettings.KeepAwakePulse) {
|
||||
|
||||
if (xTaskGetTickCount() - lastPowerPulseStart > powerPulseRate) {
|
||||
lastPowerPulseStart = xTaskGetTickCount();
|
||||
lastPowerPulseEnd = lastPowerPulseStart + powerPulseDuration;
|
||||
const TickType_t powerPulseWait = powerPulseWaitUnit * systemSettings.KeepAwakePulseWait;
|
||||
if (xTaskGetTickCount() - lastPowerPulseStart > powerPulseWait) {
|
||||
const TickType_t powerPulseDuration = powerPulseDurationUnit * systemSettings.KeepAwakePulseDuration;
|
||||
lastPowerPulseStart = xTaskGetTickCount();
|
||||
lastPowerPulseEnd = lastPowerPulseStart + powerPulseDuration;
|
||||
}
|
||||
|
||||
// If current PID is less than the pulse level, check if we want to constrain to the pulse as the floor
|
||||
|
||||
@@ -68,13 +68,18 @@
|
||||
#define TEMP_CHANGE_LONG_STEP_MAX 90 // Temp change long step MAX value
|
||||
|
||||
/* Power pulse for keeping power banks awake*/
|
||||
#define POWER_PULSE_INCREMENT 1
|
||||
#define POWER_PULSE_MAX 50 // x10 max watts
|
||||
#define POWER_PULSE_INCREMENT 1
|
||||
#define POWER_PULSE_MAX 100 // x10 max watts
|
||||
#define POWER_PULSE_WAIT_MAX 9 // 9*2.5s = 22.5 seconds
|
||||
#define POWER_PULSE_DURATION_MAX 9 // 9*250ms = 2.25 seconds
|
||||
|
||||
#ifdef MODEL_TS100
|
||||
#define POWER_PULSE_DEFAULT 0
|
||||
#else
|
||||
#define POWER_PULSE_DEFAULT 5
|
||||
#endif
|
||||
#define POWER_PULSE_WAIT_DEFAULT 4; // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
|
||||
#define POWER_PULSE_DURATION_DEFAULT 1; // Default duration of the power pulse: 1*250 = 250 ms
|
||||
|
||||
/**
|
||||
* OLED Orientation Sensitivity on Automatic mode!
|
||||
|
||||
Reference in New Issue
Block a user