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)) {
|
||||
state = temp_profile_executer_status();
|
||||
if (state->status == TPE_RUNNING)
|
||||
menu_lcd_outputf(menu, 0, "Profile running");
|
||||
else if (state->status == TPE_OFF) {
|
||||
menu_lcd_outputf(menu, 0, "Profile finished");
|
||||
if (state->status == TPE_RUNNING) {
|
||||
menu_lcd_outputf(menu, 0, "Executing...");
|
||||
menu_lcd_outputf(menu, 1, "Step %u/%u", state->step, state->profile_steps);
|
||||
(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 {
|
||||
menu_lcd_outputf(menu, 0, "Profile aborted!");
|
||||
}
|
||||
menu_lcd_outputf(menu, 1, "Step %u/%u", state->step, state->profile_steps);
|
||||
(void)adc_pt1000_get_current_resistance(&resistance);
|
||||
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");
|
||||
menu_lcd_outputf(menu, 1, "Check flags!");
|
||||
menu_lcd_outputf(menu, 2, "");
|
||||
menu_lcd_outputf(menu, 3, "Press button");
|
||||
}
|
||||
|
||||
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);
|
||||
rot_delta = menu_get_rotary_delta(menu);
|
||||
|
||||
if (menu_get_button_ready_state(menu) && push_button == BUTTON_SHORT_RELEASED) {
|
||||
/* Enter currently selected menu_entry */
|
||||
menu_list_enter_selected_entry(&list, menu);
|
||||
}
|
||||
if (menu_get_button_ready_state(menu)) {
|
||||
if (menu_get_button_ready_state(menu) && push_button == BUTTON_SHORT_RELEASED) {
|
||||
/* Enter currently selected menu_entry */
|
||||
menu_list_enter_selected_entry(&list, menu);
|
||||
}
|
||||
|
||||
if (rot_delta >= 4) {
|
||||
menu_list_scroll_down(&list);
|
||||
menu_ack_rotary_delta(menu);
|
||||
menu_changed = true;
|
||||
} else if (rot_delta <= -4) {
|
||||
menu_list_scroll_up(&list);
|
||||
menu_ack_rotary_delta(menu);
|
||||
menu_changed = true;
|
||||
if (rot_delta >= 4) {
|
||||
menu_list_scroll_down(&list);
|
||||
menu_ack_rotary_delta(menu);
|
||||
menu_changed = true;
|
||||
} else if (rot_delta <= -4) {
|
||||
menu_list_scroll_up(&list);
|
||||
menu_ack_rotary_delta(menu);
|
||||
menu_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_changed)
|
||||
|
Loading…
Reference in New Issue
Block a user