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:
@ -618,7 +618,6 @@ void MarlinUI::draw_status_screen() {
|
||||
if (cutter.isReady && PAGE_CONTAINS(STATUS_CUTTER_TEXT_Y - INFO_FONT_ASCENT, STATUS_CUTTER_TEXT_Y - 1)) {
|
||||
#if CUTTER_UNIT_IS(PERCENT)
|
||||
lcd_put_u8str(STATUS_CUTTER_TEXT_X, STATUS_CUTTER_TEXT_Y, cutter_power2str(cutter.unitPower));
|
||||
lcd_put_wchar('%');
|
||||
#elif CUTTER_UNIT_IS(RPM)
|
||||
lcd_put_u8str(STATUS_CUTTER_TEXT_X - 2, STATUS_CUTTER_TEXT_Y, ftostr51rj(float(cutter.unitPower) / 1000));
|
||||
lcd_put_wchar('K');
|
||||
|
@ -122,6 +122,7 @@ class TMenuEditItem : MenuEditItemBase {
|
||||
|
||||
// NAME TYPE STRFUNC SCALE +ROUND
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(percent ,uint8_t ,ui8tostr4pctrj , 100.f/255.f, 0.5f); // 100% right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(percent_3 ,uint8_t ,pcttostrpctrj , 1 ); // 100% right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(int3 ,int16_t ,i16tostr3rj , 1 ); // 123, -12 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(int4 ,int16_t ,i16tostr4signrj , 1 ); // 1234, -123 right-justified
|
||||
DEFINE_MENU_EDIT_ITEM_TYPE(int8 ,int8_t ,i8tostr3rj , 1 ); // 123, -12 right-justified
|
||||
|
Reference in New Issue
Block a user