1
0
forked from me/IronOS

Compare commits

..

4 Commits

Author SHA1 Message Date
Ben V. Brown
f716578138 Stop adjust buttons auto-rotating
Closes #270
2018-07-29 11:57:24 +10:00
Ben V. Brown
8ddfa0e275 Adding Norwegian (bokmål) translation
Merged in #277 locally, may need updates but better to get something in.
Closes #277
2018-07-29 11:40:25 +10:00
Yuri Schaeffer
9127802acc Display seconds until sleep in soldering mode. (#311)
Adds a number indicator to the detailed soldering mode that shows the pending time until the iron goes to sleep.
2018-07-29 11:35:25 +10:00
Ben V. Brown
2494522e85 Fix encoding screwup 2018-07-29 11:35:05 +10:00
2 changed files with 1390 additions and 1287 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -283,42 +283,24 @@ static void gui_solderingTempAdjust() {
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
}
systemSettings.SolderingTemp -= 10; // sub 10
autoRepeatTimer = xTaskGetTickCount();
autoRepeatAcceleration += PRESS_ACCEL_STEP;
}
break;
case BUTTON_F_LONG:
if (xTaskGetTickCount() - autoRepeatTimer
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
if (!lcd.getRotation()) {
systemSettings.SolderingTemp -= 10;
} else {
systemSettings.SolderingTemp += 10;
}
systemSettings.SolderingTemp += 10;
autoRepeatTimer = xTaskGetTickCount();
autoRepeatAcceleration += PRESS_ACCEL_STEP;
}
break;
case BUTTON_F_SHORT:
if (lcd.getRotation()) {
systemSettings.SolderingTemp += 10; // add 10
} else {
systemSettings.SolderingTemp -= 10; // sub 10
}
systemSettings.SolderingTemp += 10; // add 10
break;
case BUTTON_B_SHORT:
if (!lcd.getRotation()) {
systemSettings.SolderingTemp += 10; // add 10
} else {
systemSettings.SolderingTemp -= 10; // sub 10
}
systemSettings.SolderingTemp -= 10; // sub 10
break;
default:
break;
@@ -347,7 +329,12 @@ static void gui_solderingTempAdjust() {
if (xTaskGetTickCount() - lastChange > 200)
return; // exit if user just doesn't press anything for a bit
lcd.drawChar('-');
if (lcd.getRotation())
lcd.drawChar('-');
else
lcd.drawChar('+');
lcd.drawChar(' ');
lcd.printNumber(systemSettings.SolderingTemp, 3);
if (systemSettings.temperatureInF)
@@ -355,7 +342,10 @@ static void gui_solderingTempAdjust() {
else
lcd.drawSymbol(1);
lcd.drawChar(' ');
lcd.drawChar('+');
if (lcd.getRotation())
lcd.drawChar('+');
else
lcd.drawChar('-');
lcd.refresh();
GUIDelay();
}
@@ -434,6 +424,25 @@ static int gui_SolderingSleepingMode() {
}
return 0;
}
static void display_countdown(int sleepThres) {
/*
* Print seconds or minutes (if > 99 seconds) until sleep
* mode is triggered.
*/
int lastEventTime =
lastButtonTime < lastMovementTime ?
lastMovementTime : lastButtonTime;
int downCount = sleepThres - xTaskGetTickCount() + lastEventTime;
if (downCount > 9900) {
lcd.printNumber(downCount / 6000 + 1, 2);
lcd.print("M");
} else {
lcd.printNumber(downCount / 100 + 1, 2);
lcd.print("S");
}
}
static void gui_solderingMode() {
/*
* * Soldering (gui_solderingMode)
@@ -504,6 +513,11 @@ static void gui_solderingMode() {
lcd.printNumber(getTipPWM(), 3);
lcd.print("%");
if (systemSettings.sensitivity && systemSettings.SleepTime) {
lcd.print(" ");
display_countdown(sleepThres);
}
lcd.setCursor(0, 8);
lcd.print(SleepingTipAdvancedString);
gui_drawTipTemp(true);
@@ -581,7 +595,8 @@ static void gui_solderingMode() {
}
static const char *HEADERS[] = {
__DATE__, "Heap: ", "HWMG: ", "HWMP: ", "HWMM: ", "Time: ", "Move: ","Rtip: ","Ctip: ","Vin :" };
__DATE__, "Heap: ", "HWMG: ", "HWMP: ", "HWMM: ", "Time: ", "Move: ", "Rtip: ",
"Ctip: ", "Vin :" };
void showVersion(void) {
uint8_t screen = 0;
@@ -614,10 +629,10 @@ void showVersion(void) {
lcd.printNumber(lastMovementTime / 100, 5);
break;
case 7:
lcd.printNumber(getTipRawTemp(0),5);
lcd.printNumber(getTipRawTemp(0), 5);
break;
case 8:
lcd.printNumber(tipMeasurementToC(getTipRawTemp(0)),5);
lcd.printNumber(tipMeasurementToC(getTipRawTemp(0)), 5);
break;
case 9:
printVoltage();