From 076b2112a39966e3c5781dfcec393c90b70303ce Mon Sep 17 00:00:00 2001 From: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Thu, 4 Jun 2020 06:20:19 +0200 Subject: [PATCH] Fix spindle power LCD display (#18189) --- Marlin/src/feature/spindle_laser_types.h | 2 ++ Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Marlin/src/feature/spindle_laser_types.h b/Marlin/src/feature/spindle_laser_types.h index 7fa93420d1..3b34924db2 100644 --- a/Marlin/src/feature/spindle_laser_types.h +++ b/Marlin/src/feature/spindle_laser_types.h @@ -38,10 +38,12 @@ #define cutter_power_t uint16_t #define cutter_setPower_t uint16_t #define CUTTER_MENU_POWER_TYPE uint16_5 + #define cutter_power2str ui16tostr5rj #else #define cutter_power_t uint8_t #define cutter_setPower_t uint8_t #define CUTTER_MENU_POWER_TYPE uint8 + #define cutter_power2str ui8tostr3rj #endif #if ENABLED(MARLIN_DEV_MODE) diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index fc67f9432a..69827edfad 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -542,7 +542,7 @@ void MarlinUI::draw_status_screen() { // Laser / Spindle #if DO_DRAW_CUTTER if (cutter.power && PAGE_CONTAINS(STATUS_CUTTER_TEXT_Y - INFO_FONT_ASCENT, STATUS_CUTTER_TEXT_Y - 1)) { - lcd_put_u8str(STATUS_CUTTER_TEXT_X, STATUS_CUTTER_TEXT_Y, i16tostr3rj(cutter.power)); + lcd_put_u8str(STATUS_CUTTER_TEXT_X, STATUS_CUTTER_TEXT_Y, cutter_power2str(cutter.power)); #if CUTTER_DISPLAY_IS(PERCENT) lcd_put_wchar('%'); #elif CUTTER_DISPLAY_IS(RPM)