Cutter Power in percent format (#20410)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Co-authored-by: Jason Smith <jason.inet@gmail.com>
Co-authored-by: Luu Lac <45380455+shitcreek@users.noreply.github.com>
This commit is contained in:
Mike La Spina
2020-12-23 22:50:24 -06:00
committed by GitHub
parent 820cc69d0a
commit 1fc0dcdc97
6 changed files with 33 additions and 12 deletions

View File

@ -39,12 +39,17 @@ typedef IF<(SPEED_POWER_MAX > 255), uint16_t, uint8_t>::type cutter_cpower_t;
#if CUTTER_UNIT_IS(RPM) && SPEED_POWER_MAX > 255
typedef uint16_t cutter_power_t;
#define CUTTER_MENU_POWER_TYPE uint16_5
#define cutter_power2str ui16tostr5rj
#define CUTTER_MENU_POWER_TYPE uint16_5
#define cutter_power2str ui16tostr5rj
#else
typedef uint8_t cutter_power_t;
#define CUTTER_MENU_POWER_TYPE uint8
#define cutter_power2str ui8tostr3rj
#if CUTTER_UNIT_IS(PERCENT)
#define CUTTER_MENU_POWER_TYPE percent_3
#define cutter_power2str pcttostrpctrj
#else
#define CUTTER_MENU_POWER_TYPE uint8
#define cutter_power2str ui8tostr3rj
#endif
#endif
#if ENABLED(MARLIN_DEV_MODE)