Skip to content

Commit

Permalink
Change status to 'In Control' when in control
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Mar 11, 2024
1 parent fb1e264 commit 8d6d22c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CYD-Klipper/src/ui/panels/printer_panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ static void update_printer_status_text(lv_event_t * e)
int index = config - global_config.printer_config;
PrinterMinimal * printer = &printer_minimal[index];

if (!printer->online){
if (config == get_current_printer_config())
{
lv_label_set_text(label, "In Control");
return;
}

if (!printer->online)
{
lv_label_set_text(label, "Offline");
return;
}
Expand Down
3 changes: 0 additions & 3 deletions CYD-Klipper/src/ui/ui_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,16 @@ void on_timer_destroy(lv_event_t * e)
{
lv_timer_del(timer);
timer = NULL;
Serial.println("Timer destroy");
}

void timer_callback(lv_timer_t *timer)
{
lv_obj_t * panel = (lv_obj_t *)timer->user_data;
lv_obj_del(panel);
Serial.println("Timer callback");
}

void lv_create_popup_message(const char* message, uint16_t timeout_ms)
{
Serial.println("Hello");
if (message == nullptr || timer != NULL)
{
return;
Expand Down

0 comments on commit 8d6d22c

Please sign in to comment.