fix manual override.

This commit is contained in:
2023-04-09 20:09:34 +02:00
parent dc445af419
commit b6ccfd7019
3 changed files with 12 additions and 14 deletions
+10 -12
View File
@@ -35,13 +35,13 @@ static void next_phase() {
s_calib.phase++;
}
static const char* calib0_opts[] = {
static const char* hello_menu_opts[] = {
"Pokračovat",
"Zrušit",
NULL
};
static void calib0_cb(int opt) {
static void hello_menu_cb(int opt) {
switch (opt) {
case 0:
// Continue
@@ -57,16 +57,13 @@ static void calib0_cb(int opt) {
}
static const char* calib1_opts[] = {
static const char* sample1_menu_opts[] = {
"Vzorek 1",
"Zrušit",
NULL
};
static void calib1_cb(int opt) {
static void sample1_menu_cb(int opt) {
switch (opt) {
case 0:
// Continue
@@ -83,14 +80,14 @@ static void calib1_cb(int opt) {
}
}
static const char* calib3_opts[] = {
static const char* sample2_menu_opts[] = {
"Vzorek 2",
"Zrušit",
NULL
};
static void calib3_cb(int opt) {
static void sample2_menu_cb(int opt) {
switch (opt) {
case 0:
// Continue
@@ -121,7 +118,7 @@ void screen_calibration(GuiEvent event)
fb_text(FBW/2, 16, "Vychlaď", TEXT_CENTER, 1);
fb_text(FBW/2, 26, "troubu", TEXT_CENTER, 1);
}
screen_menu_offset(event, calib0_opts, calib0_cb, 30);
screen_menu_offset(event, hello_menu_opts, hello_menu_cb, 30);
break;
case PH_SAMPLE1: // Heater is active, waiting for mark
@@ -131,9 +128,9 @@ void screen_calibration(GuiEvent event)
fb_text(FBW/2, 26, "teplotu", TEXT_CENTER, 1);
}
if (s_calib.phase == PH_SAMPLE1) {
screen_menu_offset(event, calib1_opts, calib1_cb, 30);
screen_menu_offset(event, sample1_menu_opts, sample1_menu_cb, 30);
} else {
screen_menu_offset(event, calib3_opts, calib3_cb, 30);
screen_menu_offset(event, sample2_menu_opts, sample2_menu_cb, 30);
}
break;
@@ -200,6 +197,7 @@ void screen_calibration(GuiEvent event)
app_temp_set_calib(a, b);
} else {
// for the next phase
app_heater_manual_override(100);
}
break;