Fix: Unsupported use of %f in printf (#21001)

This commit is contained in:
MKS-Sean
2021-02-08 10:36:57 +08:00
committed by Scott Lahteine
parent 1aae6395c6
commit 127a4ada93
15 changed files with 137 additions and 95 deletions

View File

@@ -235,7 +235,8 @@ void disp_print_time() {
}
void disp_fan_Zpos() {
sprintf_P(public_buf_l, PSTR("%.3f"), current_position[Z_AXIS]);
char str_1[16];
sprintf_P(public_buf_l, PSTR("%s"), dtostrf(current_position[Z_AXIS], 1, 3, str_1));
lv_label_set_text(labelZpos, public_buf_l);
}