map error text in moonraker as error state

This commit is contained in:
suchmememanyskill
2024-03-13 22:26:10 +01:00
parent a7bde99442
commit 1a31ef0758

View File

@@ -139,7 +139,7 @@ void fetch_printer_data()
{ {
printer_state = PRINTER_STATE_IDLE; printer_state = PRINTER_STATE_IDLE;
} }
else if (strcmp(state, "shutdown") == 0 && printer.state != PRINTER_STATE_ERROR) else if ((strcmp(state, "shutdown") == 0 || strcmp(state, "error") == 0) && printer.state != PRINTER_STATE_ERROR)
{ {
printer_state = PRINTER_STATE_ERROR; printer_state = PRINTER_STATE_ERROR;
} }