mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Change status to 'In Control' when in control
This commit is contained in:
@@ -34,7 +34,14 @@ static void update_printer_status_text(lv_event_t * e)
|
|||||||
int index = config - global_config.printer_config;
|
int index = config - global_config.printer_config;
|
||||||
PrinterMinimal * printer = &printer_minimal[index];
|
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");
|
lv_label_set_text(label, "Offline");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,19 +209,16 @@ void on_timer_destroy(lv_event_t * e)
|
|||||||
{
|
{
|
||||||
lv_timer_del(timer);
|
lv_timer_del(timer);
|
||||||
timer = NULL;
|
timer = NULL;
|
||||||
Serial.println("Timer destroy");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void timer_callback(lv_timer_t *timer)
|
void timer_callback(lv_timer_t *timer)
|
||||||
{
|
{
|
||||||
lv_obj_t * panel = (lv_obj_t *)timer->user_data;
|
lv_obj_t * panel = (lv_obj_t *)timer->user_data;
|
||||||
lv_obj_del(panel);
|
lv_obj_del(panel);
|
||||||
Serial.println("Timer callback");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lv_create_popup_message(const char* message, uint16_t timeout_ms)
|
void lv_create_popup_message(const char* message, uint16_t timeout_ms)
|
||||||
{
|
{
|
||||||
Serial.println("Hello");
|
|
||||||
if (message == nullptr || timer != NULL)
|
if (message == nullptr || timer != NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user