1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 05:48:43 +00:00

Minor DOGM status screen fix (#15746)

This commit is contained in:
Robby Candra 2019-11-02 19:04:31 +07:00 committed by Scott Lahteine
parent bdb452ed81
commit 7360e9343a

View File

@ -388,17 +388,21 @@ void MarlinUI::draw_status_screen() {
#endif
heat_bits = new_bits;
#endif
const xyz_pos_t lpos = current_position.asLogical();
if (showxy)
strcpy(zstring, ftostr52sp(lpos.z));
if (showxy) {
strcpy(xstring, ftostr4sign(lpos.x));
strcpy(ystring, ftostr4sign(lpos.y));
}
else {
#if ENABLED(LCD_SHOW_E_TOTAL)
const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // After 100m switch to cm
sprintf_P(xstring, PSTR("%ld%cm"), uint32_t(_MAX(e_move_accumulator, 0.0f)) / escale, escale == 10 ? 'c' : 'm'); // 1234567mm
#endif
}
strcpy(ystring, ftostr4sign(lpos.y));
strcpy(zstring, ftostr52sp( lpos.z));
#if ENABLED(FILAMENT_LCD_DISPLAY)
strcpy(wstring, ftostr12ns(filwidth.measured_mm));
strcpy(mstring, i16tostr3(planner.volumetric_percent(parser.volumetric_enabled)));