mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
@@ -263,6 +263,8 @@ static void gui_drawBatteryIcon() {
|
|||||||
static void gui_solderingTempAdjust() {
|
static void gui_solderingTempAdjust() {
|
||||||
uint32_t lastChange = xTaskGetTickCount();
|
uint32_t lastChange = xTaskGetTickCount();
|
||||||
currentlyActiveTemperatureTarget = 0;
|
currentlyActiveTemperatureTarget = 0;
|
||||||
|
uint32_t autoRepeatTimer = 0;
|
||||||
|
uint8_t autoRepeatAcceleration = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
lcd.setCursor(0, 0);
|
lcd.setCursor(0, 0);
|
||||||
lcd.clearScreen();
|
lcd.clearScreen();
|
||||||
@@ -279,10 +281,30 @@ static void gui_solderingTempAdjust() {
|
|||||||
return;
|
return;
|
||||||
break;
|
break;
|
||||||
case BUTTON_B_LONG:
|
case BUTTON_B_LONG:
|
||||||
|
if (xTaskGetTickCount() - autoRepeatTimer
|
||||||
|
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||||
|
if (!lcd.getRotation()) {
|
||||||
|
systemSettings.SolderingTemp += 10; // add 10
|
||||||
|
} else {
|
||||||
|
systemSettings.SolderingTemp -= 10; // sub 10
|
||||||
|
}
|
||||||
|
autoRepeatTimer = xTaskGetTickCount();
|
||||||
|
|
||||||
|
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BUTTON_F_LONG:
|
case BUTTON_F_LONG:
|
||||||
|
if (xTaskGetTickCount() - autoRepeatTimer
|
||||||
|
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||||
|
if (!lcd.getRotation()) {
|
||||||
|
systemSettings.SolderingTemp -= 10;
|
||||||
|
} else {
|
||||||
|
systemSettings.SolderingTemp += 10;
|
||||||
|
}
|
||||||
|
autoRepeatTimer = xTaskGetTickCount();
|
||||||
|
|
||||||
|
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BUTTON_F_SHORT:
|
case BUTTON_F_SHORT:
|
||||||
if (lcd.getRotation()) {
|
if (lcd.getRotation()) {
|
||||||
@@ -301,6 +323,11 @@ static void gui_solderingTempAdjust() {
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if ((PRESS_ACCEL_INTERVAL_MAX - autoRepeatAcceleration)
|
||||||
|
< PRESS_ACCEL_INTERVAL_MIN) {
|
||||||
|
autoRepeatAcceleration = PRESS_ACCEL_INTERVAL_MAX
|
||||||
|
- PRESS_ACCEL_INTERVAL_MIN;
|
||||||
|
}
|
||||||
// constrain between 50-450 C
|
// constrain between 50-450 C
|
||||||
if (systemSettings.temperatureInF) {
|
if (systemSettings.temperatureInF) {
|
||||||
if (systemSettings.SolderingTemp > 850)
|
if (systemSettings.SolderingTemp > 850)
|
||||||
|
|||||||
Reference in New Issue
Block a user