Add stats panel

This commit is contained in:
suchmememanyskill
2024-02-03 15:16:25 +01:00
parent ba015bb2e8
commit 41be4b1a31
10 changed files with 275 additions and 30 deletions

View File

@@ -19,9 +19,7 @@ static void move_printer(const char* axis, float amount) {
send_gcode(true, "G91");
}
const char * space = "%20";
sprintf(gcode, "G1%s%s%s%.1f%sF6000", space, axis, extra, amount, space);
sprintf(gcode, "G1 %s%s%.1f F6000", axis, extra, amount);
send_gcode(true, gcode);
if (absolute_coords) {
@@ -195,6 +193,11 @@ static void root_panel_state_update(lv_event_t * e){
}
void move_panel_init(lv_obj_t* panel){
if (printer.state == PRINTER_STATE_PRINTING){
stats_panel_init(panel);
return;
}
last_homing_state = !printer.homed_axis;
lv_obj_add_event_cb(panel, root_panel_state_update, LV_EVENT_MSG_RECEIVED, NULL);