Issue #28: Change GUI of profile executer
This commit is contained in:
parent
7c9d296e34
commit
08eee66d30
@ -430,21 +430,30 @@ static void gui_menu_temp_profile_execute(struct lcd_menu *menu, enum menu_entry
|
|||||||
|
|
||||||
if (systick_ticks_have_passed(last_tick, 250)) {
|
if (systick_ticks_have_passed(last_tick, 250)) {
|
||||||
state = temp_profile_executer_status();
|
state = temp_profile_executer_status();
|
||||||
if (state->status == TPE_RUNNING)
|
if (state->status == TPE_RUNNING) {
|
||||||
menu_lcd_outputf(menu, 0, "Profile running");
|
menu_lcd_outputf(menu, 0, "Executing...");
|
||||||
else if (state->status == TPE_OFF) {
|
menu_lcd_outputf(menu, 1, "Step %u/%u", state->step, state->profile_steps);
|
||||||
menu_lcd_outputf(menu, 0, "Profile finished");
|
(void)adc_pt1000_get_current_resistance(&resistance);
|
||||||
|
res = temp_converter_convert_resistance_to_temp(resistance, &temperature);
|
||||||
|
menu_lcd_outputf(menu, 2, "Temp: %s%.1f " LCD_DEGREE_SYMBOL_STRING "C",
|
||||||
|
(res < 0 ? "<" : (res > 0 ? ">" : "")), temperature);
|
||||||
|
if (oven_pid_get_status() == OVEN_PID_RUNNING) {
|
||||||
|
menu_lcd_outputf(menu, 3, "Target: %.0f " LCD_DEGREE_SYMBOL_STRING "C", state->setpoint);
|
||||||
|
} else {
|
||||||
|
menu_lcd_outputf(menu, 3, "Temp Off");
|
||||||
|
}
|
||||||
|
} else if (state->status == TPE_OFF) {
|
||||||
|
menu_lcd_outputf(menu, 0, "Finished!");
|
||||||
|
menu_lcd_outputf(menu, 1, "Press button");
|
||||||
|
menu_lcd_outputf(menu, 2, "to return.");
|
||||||
|
(void)adc_pt1000_get_current_resistance(&resistance);
|
||||||
|
res = temp_converter_convert_resistance_to_temp(resistance, &temperature);
|
||||||
|
menu_lcd_outputf(menu, 3, "Temp: %.1f ", LCD_DEGREE_SYMBOL_STRING "C");
|
||||||
} else {
|
} else {
|
||||||
menu_lcd_outputf(menu, 0, "Profile aborted!");
|
menu_lcd_outputf(menu, 0, "Profile aborted!");
|
||||||
}
|
menu_lcd_outputf(menu, 1, "Check flags!");
|
||||||
menu_lcd_outputf(menu, 1, "Step %u/%u", state->step, state->profile_steps);
|
menu_lcd_outputf(menu, 2, "");
|
||||||
(void)adc_pt1000_get_current_resistance(&resistance);
|
menu_lcd_outputf(menu, 3, "Press button");
|
||||||
res = temp_converter_convert_resistance_to_temp(resistance, &temperature);
|
|
||||||
menu_lcd_outputf(menu, 2, "Temp: %s%.1f", (res < 0 ? "<" : (res > 0 ? ">" : "")), temperature);
|
|
||||||
if (oven_pid_get_status() == OVEN_PID_RUNNING) {
|
|
||||||
menu_lcd_outputf(menu, 3, "Target: %.0f", state->setpoint);
|
|
||||||
} else {
|
|
||||||
menu_lcd_outputf(menu, 3, "Temp Off");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
last_tick = systick_get_global_tick();
|
last_tick = systick_get_global_tick();
|
||||||
@ -630,19 +639,21 @@ static void gui_menu_root_entry(struct lcd_menu *menu, enum menu_entry_func_entr
|
|||||||
push_button = menu_get_button_state(menu);
|
push_button = menu_get_button_state(menu);
|
||||||
rot_delta = menu_get_rotary_delta(menu);
|
rot_delta = menu_get_rotary_delta(menu);
|
||||||
|
|
||||||
if (menu_get_button_ready_state(menu) && push_button == BUTTON_SHORT_RELEASED) {
|
if (menu_get_button_ready_state(menu)) {
|
||||||
/* Enter currently selected menu_entry */
|
if (menu_get_button_ready_state(menu) && push_button == BUTTON_SHORT_RELEASED) {
|
||||||
menu_list_enter_selected_entry(&list, menu);
|
/* Enter currently selected menu_entry */
|
||||||
}
|
menu_list_enter_selected_entry(&list, menu);
|
||||||
|
}
|
||||||
|
|
||||||
if (rot_delta >= 4) {
|
if (rot_delta >= 4) {
|
||||||
menu_list_scroll_down(&list);
|
menu_list_scroll_down(&list);
|
||||||
menu_ack_rotary_delta(menu);
|
menu_ack_rotary_delta(menu);
|
||||||
menu_changed = true;
|
menu_changed = true;
|
||||||
} else if (rot_delta <= -4) {
|
} else if (rot_delta <= -4) {
|
||||||
menu_list_scroll_up(&list);
|
menu_list_scroll_up(&list);
|
||||||
menu_ack_rotary_delta(menu);
|
menu_ack_rotary_delta(menu);
|
||||||
menu_changed = true;
|
menu_changed = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menu_changed)
|
if (menu_changed)
|
||||||
|
Loading…
Reference in New Issue
Block a user