mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Merge 14cca01f78 into ebdff59293
This commit is contained in:
@@ -114,9 +114,10 @@ typedef enum {
|
||||
} usbpdMode_t;
|
||||
|
||||
typedef enum {
|
||||
DISABLED = 0, // Locking buttons is disabled
|
||||
BOOST = 1, // Locking buttons for Boost mode only
|
||||
FULL = 2, // Locking buttons for Boost mode AND for Soldering mode
|
||||
DISABLED = 0, // All buttons are unlocked
|
||||
BOOST = 1, // All buttons are locked except boost
|
||||
FULL = 2, // All buttons are locked
|
||||
TEMP = 3, // All buttons are locked except -/B to change the temperature
|
||||
} lockingMode_t;
|
||||
|
||||
/* Selection of the soldering tip
|
||||
|
||||
@@ -147,6 +147,7 @@ struct TranslationIndexTable {
|
||||
uint16_t SettingStartSleepOffChar;
|
||||
uint16_t SettingLockBoostChar;
|
||||
uint16_t SettingLockFullChar;
|
||||
uint16_t SettingLockTempChar;
|
||||
uint16_t USBPDModeDefault;
|
||||
uint16_t USBPDModeNoDynamic;
|
||||
uint16_t USBPDModeSafe;
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct {
|
||||
} SettingConstants;
|
||||
|
||||
static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = {
|
||||
//{ min, max, increment, default}
|
||||
//{ min, max, increment, default}
|
||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, SOLDERING_TEMP}, // SolderingTemp
|
||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp
|
||||
{ 0, 15, 1, SLEEP_TIME}, // SleepTime
|
||||
@@ -72,7 +72,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
||||
{ 0, 1, 1, DETAILED_SOLDERING}, // DetailedSoldering
|
||||
{ 0, (uint16_t)(HasFahrenheit ? 1 : 0), 1, TEMPERATURE_INF}, // TemperatureInF
|
||||
{ 0, 1, 1, DESCRIPTION_SCROLL_SPEED}, // DescriptionScrollSpeed
|
||||
{ 0, 2, 1, LOCKING_MODE}, // LockingMode
|
||||
{ 0, 3, 1, LOCKING_MODE}, // LockingMode
|
||||
{ 0, 99, 1, POWER_PULSE_DEFAULT}, // KeepAwakePulse
|
||||
{ 1, POWER_PULSE_WAIT_MAX, 1, POWER_PULSE_WAIT_DEFAULT}, // KeepAwakePulseWait
|
||||
{ 1, POWER_PULSE_DURATION_MAX, 1, POWER_PULSE_DURATION_DEFAULT}, // KeepAwakePulseDuration
|
||||
|
||||
@@ -635,6 +635,9 @@ static void displayLockingMode(void) {
|
||||
case lockingMode_t::FULL:
|
||||
OLED::print(translatedString(Tr->SettingLockFullChar), FontStyle::LARGE);
|
||||
break;
|
||||
case lockingMode_t::TEMP:
|
||||
OLED::print(translatedString(Tr->SettingLockTempChar), FontStyle::LARGE);
|
||||
break;
|
||||
default:
|
||||
OLED::drawUnavailableIcon();
|
||||
break;
|
||||
|
||||
@@ -35,7 +35,7 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
|
||||
cxt->scratch_state.state1 = 3;
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
if (getSettingValue(SettingsOptions::BoostTemp) && (getSettingValue(SettingsOptions::LockingMode) == lockingMode_t::BOOST)) {
|
||||
if (getSettingValue(SettingsOptions::BoostTemp) && (getSettingValue(SettingsOptions::LockingMode) >= lockingMode_t::BOOST ||)) {
|
||||
cxt->scratch_state.state2 = 1;
|
||||
break;
|
||||
}
|
||||
@@ -65,6 +65,9 @@ OperatingMode handleSolderingButtons(const ButtonState buttons, guiContext *cxt)
|
||||
}
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
if (getSettingValue(SettingsOptions::LockingMode) == lockingMode_t::TEMP) {
|
||||
break;
|
||||
}
|
||||
case BUTTON_B_SHORT:
|
||||
cxt->transitionMode = TransitionAnimation::Left;
|
||||
return OperatingMode::TemperatureAdjust;
|
||||
|
||||
Reference in New Issue
Block a user