From ac5cb0989eb879b243b653a0e403460bf2acd589 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 15:40:21 +0200 Subject: [PATCH 1/8] Uncomment linearity correction menu. Fix return from linearity correction menu. --- Firmware/ultralcd.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index fb4a083c..1417dd09 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -123,7 +123,7 @@ static void lcd_control_temperature_preheat_pla_settings_menu(); static void lcd_control_temperature_preheat_abs_settings_menu(); static void lcd_control_motion_menu(); static void lcd_control_volumetric_menu(); -//static void lcd_settings_menu_back(); +static void lcd_settings_linearity_correction_menu_back(); static void prusa_stat_printerstatus(int _status); static void prusa_stat_farm_number(); @@ -4484,13 +4484,13 @@ void lcd_wizard(int state) { lcd_return_to_status(); lcd_update(2); } -/* + void lcd_settings_linearity_correction_menu(void) { MENU_BEGIN(); if (menu_item_back_P(_T(MSG_MAIN))) { - lcd_settings_menu_back(); + lcd_settings_linearity_correction_menu_back(); return; } // MENU_ITEM_BACK_P(_T(MSG_SETTINGS)); @@ -4505,7 +4505,7 @@ void lcd_settings_linearity_correction_menu(void) MENU_ITEM_EDIT_int3_P(_i("E-correct"), &corr[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 MENU_END(); } -*/ + static void lcd_settings_menu() { EEPROM_read(EEPROM_SILENT, (uint8_t*)&SilentModeMenu, sizeof(SilentModeMenu)); @@ -4576,7 +4576,7 @@ static void lcd_settings_menu() else MENU_ITEM_SUBMENU_P(_T(MSG_CRASHDETECT_NA), lcd_crash_mode_info); } -// MENU_ITEM_SUBMENU_P(_i("Lin. correction"), lcd_settings_linearity_correction_menu); + MENU_ITEM_SUBMENU_P(_i("Lin. correction"), lcd_settings_linearity_correction_menu); #endif //TMC2130 if (temp_cal_active == false) @@ -4661,8 +4661,8 @@ static void lcd_ustep_linearity_menu_save() } #endif //TMC2130 -/* -static void lcd_settings_menu_back() + +static void lcd_settings_linearity_correction_menu_back() { #ifdef TMC2130 bool changed = false; @@ -4677,10 +4677,10 @@ static void lcd_settings_menu_back() lcd_ustep_linearity_menu_save(); if (changed) tmc2130_init(); #endif //TMC2130 - menu_menu = lcd_main_menu; + menu_menu = lcd_settings_menu; // lcd_main_menu(); } -*/ + static void lcd_calibration_menu() { From 5daae818e1ceab4ddeb4486619f77c569a95522e Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 17:33:43 +0200 Subject: [PATCH 2/8] Convert menu_item_edit to template function. --- Firmware/menu.cpp | 19 +++++++++++++------ Firmware/menu.h | 5 +++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index 7fa17746..b588e718 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -269,8 +269,11 @@ const char menu_fmt_float31[] PROGMEM = "%c%.12S:%s%+06.1f"; const char menu_fmt_float13[] PROGMEM = "%c%.12S:%s%+06.3f"; +template +void menu_draw_P(char chr, const char* str, int16_t val); -void menu_draw_int3(char chr, const char* str, int16_t val) +template<> +void menu_draw_P(char chr, const char* str, int16_t val) { int text_len = strlen_P(str); if (text_len > 15) text_len = 15; @@ -302,7 +305,8 @@ void menu_draw_float13(char chr, const char* str, float val) lcd_printf_P(menu_fmt_float13, chr, str, spaces, val); } -void _menu_edit_int3(void) +template +void _menu_edit_P(void) { menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); if (lcd_draw_update) @@ -310,7 +314,7 @@ void _menu_edit_int3(void) if (lcd_encoder < _md->minEditValue) lcd_encoder = _md->minEditValue; if (lcd_encoder > _md->maxEditValue) lcd_encoder = _md->maxEditValue; lcd_set_cursor(0, 1); - menu_draw_int3(' ', _md->editLabel, (int)lcd_encoder); + menu_draw_P(' ', _md->editLabel, (int)lcd_encoder); } if (LCD_CLICKED) { @@ -319,7 +323,8 @@ void _menu_edit_int3(void) } } -uint8_t menu_item_edit_int3(const char* str, int16_t* pval, int16_t min_val, int16_t max_val) +template +uint8_t menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val) { menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); if (menu_item == menu_line) @@ -327,11 +332,11 @@ uint8_t menu_item_edit_int3(const char* str, int16_t* pval, int16_t min_val, int if (lcd_draw_update) { lcd_set_cursor(0, menu_row); - menu_draw_int3((lcd_encoder == menu_item)?'>':' ', str, *pval); + menu_draw_P((lcd_encoder == menu_item)?'>':' ', str, *pval); } if (menu_clicked && (lcd_encoder == menu_item)) { - menu_submenu_no_reset(_menu_edit_int3); + menu_submenu_no_reset(_menu_edit_P); _md->editLabel = str; _md->editValue = pval; _md->minEditValue = min_val; @@ -344,6 +349,8 @@ uint8_t menu_item_edit_int3(const char* str, int16_t* pval, int16_t min_val, int return 0; } +template uint8_t menu_item_edit_P(const char* str, int16_t *pval, int16_t min_val, int16_t max_val); + #undef _menu_data diff --git a/Firmware/menu.h b/Firmware/menu.h index af6f3896..59167246 100644 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -104,9 +104,10 @@ extern void menu_draw_float13(char chr, const char* str, float val); extern void _menu_edit_int3(void); -#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { if (menu_item_edit_int3(str, pval, minval, maxval)) return; } while (0) +#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { if (menu_item_edit_P(str, pval, minval, maxval)) return; } while (0) //#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) MENU_ITEM_EDIT(int3, str, pval, minval, maxval) -extern uint8_t menu_item_edit_int3(const char* str, int16_t* pval, int16_t min_val, int16_t max_val); +template +extern uint8_t menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val); #endif //_MENU_H From 5a7c9e3ffd2874da880f942991ce3087945d75f4 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 18:00:05 +0200 Subject: [PATCH 3/8] Make local functions static. Saves 30B of flash with Arduino 1.6.9. No difference with Arduino 1.8.5. --- Firmware/menu.cpp | 10 +++++----- Firmware/menu.h | 7 ------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index b588e718..493ff260 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -92,7 +92,7 @@ void menu_back(void) } } -void menu_back_no_reset(void) +static void menu_back_no_reset(void) { if (menu_depth > 0) { @@ -126,7 +126,7 @@ void menu_submenu(menu_func_t submenu) } } -void menu_submenu_no_reset(menu_func_t submenu) +static void menu_submenu_no_reset(menu_func_t submenu) { if (menu_depth <= MENU_DEPTH_MAX) { @@ -164,7 +164,7 @@ int menu_draw_item_printf_P(char type_char, const char* format, ...) } */ -int menu_draw_item_puts_P(char type_char, const char* str) +static int menu_draw_item_puts_P(char type_char, const char* str) { lcd_set_cursor(0, menu_row); int cnt = lcd_printf_P(PSTR("%c%-18S%c"), (lcd_encoder == menu_item)?'>':' ', str, type_char); @@ -270,7 +270,7 @@ const char menu_fmt_float31[] PROGMEM = "%c%.12S:%s%+06.1f"; const char menu_fmt_float13[] PROGMEM = "%c%.12S:%s%+06.3f"; template -void menu_draw_P(char chr, const char* str, int16_t val); +static void menu_draw_P(char chr, const char* str, int16_t val); template<> void menu_draw_P(char chr, const char* str, int16_t val) @@ -306,7 +306,7 @@ void menu_draw_float13(char chr, const char* str, float val) } template -void _menu_edit_P(void) +static void _menu_edit_P(void) { menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); if (lcd_draw_update) diff --git a/Firmware/menu.h b/Firmware/menu.h index 59167246..f752b963 100644 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -55,21 +55,16 @@ extern void menu_end(void); extern void menu_back(void); -extern void menu_back_no_reset(void); - extern void menu_back_if_clicked(void); extern void menu_back_if_clicked_fb(void); extern void menu_submenu(menu_func_t submenu); -extern void menu_submenu_no_reset(menu_func_t submenu); - extern uint8_t menu_item_ret(void); //extern int menu_draw_item_printf_P(char type_char, const char* format, ...); -extern int menu_draw_item_puts_P(char type_char, const char* str); //int menu_draw_item_puts_P_int16(char type_char, const char* str, int16_t val, ); @@ -96,13 +91,11 @@ extern const char menu_fmt_int3[]; extern const char menu_fmt_float31[]; -extern void menu_draw_int3(char chr, const char* str, int16_t val); extern void menu_draw_float31(char chr, const char* str, float val); extern void menu_draw_float13(char chr, const char* str, float val); -extern void _menu_edit_int3(void); #define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { if (menu_item_edit_P(str, pval, minval, maxval)) return; } while (0) //#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) MENU_ITEM_EDIT(int3, str, pval, minval, maxval) From 46a3baac573bc027101ef39bf2e6c553f7814e68 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 20:06:09 +0200 Subject: [PATCH 4/8] Add menu_item_edit_P specialization to be used for linearity correction. Works well, but costs about 600..700B of FLASH, needs to be optimized. --- Firmware/menu.cpp | 25 +++++++++++++++++++++++++ Firmware/menu.h | 2 +- Firmware/ultralcd.cpp | 9 ++++----- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index 493ff260..a315f240 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -9,6 +9,7 @@ #include "Configuration.h" #include "Marlin.h" #include "ultralcd.h" +#include "language.h" @@ -269,6 +270,8 @@ const char menu_fmt_float31[] PROGMEM = "%c%.12S:%s%+06.1f"; const char menu_fmt_float13[] PROGMEM = "%c%.12S:%s%+06.3f"; +const char menu_fmt_float13off[] PROGMEM = "%c%.12S:%s%"; + template static void menu_draw_P(char chr, const char* str, int16_t val); @@ -305,6 +308,27 @@ void menu_draw_float13(char chr, const char* str, float val) lcd_printf_P(menu_fmt_float13, chr, str, spaces, val); } +template<> +void menu_draw_P(char chr, const char* str, int16_t val) +{ + menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); + int text_len = strlen_P(str); + if (text_len > 15) text_len = 15; + char spaces[21]; + strcpy_P(spaces, menu_20x_space); + spaces[12 - text_len] = 0; + float factor = 1.0 + static_cast(val) / 1000.0; + if (val == _md->minEditValue) + { + lcd_printf_P(menu_fmt_float13off, chr, str, spaces); + lcd_puts_P(_i(" [off]")); + } + else + { + lcd_printf_P(menu_fmt_float13, chr, str, spaces, factor); + } +} + template static void _menu_edit_P(void) { @@ -350,6 +374,7 @@ uint8_t menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_v } template uint8_t menu_item_edit_P(const char* str, int16_t *pval, int16_t min_val, int16_t max_val); +template uint8_t menu_item_edit_P(const char* str, uint8_t *pval, int16_t min_val, int16_t max_val); #undef _menu_data diff --git a/Firmware/menu.h b/Firmware/menu.h index f752b963..73e4925a 100644 --- a/Firmware/menu.h +++ b/Firmware/menu.h @@ -97,7 +97,7 @@ extern void menu_draw_float31(char chr, const char* str, float val); extern void menu_draw_float13(char chr, const char* str, float val); -#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { if (menu_item_edit_P(str, pval, minval, maxval)) return; } while (0) +#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) do { if (menu_item_edit_P(str, pval, minval, maxval)) return; } while (0) //#define MENU_ITEM_EDIT_int3_P(str, pval, minval, maxval) MENU_ITEM_EDIT(int3, str, pval, minval, maxval) template extern uint8_t menu_item_edit_P(const char* str, T pval, int16_t min_val, int16_t max_val); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 1417dd09..7997202f 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4496,13 +4496,12 @@ void lcd_settings_linearity_correction_menu(void) // MENU_ITEM_BACK_P(_T(MSG_SETTINGS)); #ifdef TMC2130_LINEARITY_CORRECTION_XYZ //tmc2130_wave_fac[X_AXIS] - int corr[4] = {tmc2130_wave_fac[X_AXIS], tmc2130_wave_fac[Y_AXIS], tmc2130_wave_fac[Z_AXIS], tmc2130_wave_fac[E_AXIS]}; - MENU_ITEM_EDIT_int3_P(_i("X-correct"), &corr[X_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 - MENU_ITEM_EDIT_int3_P(_i("Y-correct"), &corr[Y_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 - MENU_ITEM_EDIT_int3_P(_i("Z-correct"), &corr[Z_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 + MENU_ITEM_EDIT_int3_P(_i("X-correct"), &tmc2130_wave_fac[X_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 + MENU_ITEM_EDIT_int3_P(_i("Y-correct"), &tmc2130_wave_fac[Y_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 + MENU_ITEM_EDIT_int3_P(_i("Z-correct"), &tmc2130_wave_fac[Z_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 #endif //TMC2130_LINEARITY_CORRECTION_XYZ - MENU_ITEM_EDIT_int3_P(_i("E-correct"), &corr[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 + MENU_ITEM_EDIT_int3_P(_i("E-correct"), &tmc2130_wave_fac[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 MENU_END(); } From df61172984a3eee287feea122abdd2cd20dd7cc0 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 20:31:49 +0200 Subject: [PATCH 5/8] Fix linearity correction not saved and applied when menu was left by timeout. --- Firmware/ultralcd.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 7997202f..ad357a4c 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -123,7 +123,7 @@ static void lcd_control_temperature_preheat_pla_settings_menu(); static void lcd_control_temperature_preheat_abs_settings_menu(); static void lcd_control_motion_menu(); static void lcd_control_volumetric_menu(); -static void lcd_settings_linearity_correction_menu_back(); +static void lcd_settings_linearity_correction_menu_save(); static void prusa_stat_printerstatus(int _status); static void prusa_stat_farm_number(); @@ -4488,12 +4488,7 @@ void lcd_wizard(int state) { void lcd_settings_linearity_correction_menu(void) { MENU_BEGIN(); - if (menu_item_back_P(_T(MSG_MAIN))) - { - lcd_settings_linearity_correction_menu_back(); - return; - } -// MENU_ITEM_BACK_P(_T(MSG_SETTINGS)); + MENU_ITEM_BACK_P(_T(MSG_SETTINGS)); #ifdef TMC2130_LINEARITY_CORRECTION_XYZ //tmc2130_wave_fac[X_AXIS] @@ -4503,6 +4498,10 @@ void lcd_settings_linearity_correction_menu(void) #endif //TMC2130_LINEARITY_CORRECTION_XYZ MENU_ITEM_EDIT_int3_P(_i("E-correct"), &tmc2130_wave_fac[E_AXIS], TMC2130_WAVE_FAC1000_MIN-TMC2130_WAVE_FAC1000_STP, TMC2130_WAVE_FAC1000_MAX);////MSG_EXTRUDER_CORRECTION c=9 r=0 MENU_END(); + if(menu_leaving) + { + lcd_settings_linearity_correction_menu_save(); + } } static void lcd_settings_menu() @@ -4661,7 +4660,7 @@ static void lcd_ustep_linearity_menu_save() #endif //TMC2130 -static void lcd_settings_linearity_correction_menu_back() +static void lcd_settings_linearity_correction_menu_save() { #ifdef TMC2130 bool changed = false; @@ -4676,8 +4675,6 @@ static void lcd_settings_linearity_correction_menu_back() lcd_ustep_linearity_menu_save(); if (changed) tmc2130_init(); #endif //TMC2130 - menu_menu = lcd_settings_menu; -// lcd_main_menu(); } From 085c77effb2b70b0d7f847f32e9974cd8f398d70 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 20:38:07 +0200 Subject: [PATCH 6/8] Fix when value edited, other values appeard as +1.000 instead of [off]. --- Firmware/menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index a315f240..c73b2843 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -318,7 +318,7 @@ void menu_draw_P(char chr, const char* str, int16_t val) strcpy_P(spaces, menu_20x_space); spaces[12 - text_len] = 0; float factor = 1.0 + static_cast(val) / 1000.0; - if (val == _md->minEditValue) + if (val <= _md->minEditValue) { lcd_printf_P(menu_fmt_float13off, chr, str, spaces); lcd_puts_P(_i(" [off]")); From ea88dea43243fa56d0daeee168e121054ddfc85c Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 21:24:14 +0200 Subject: [PATCH 7/8] Fix memory overwrite. --- Firmware/menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index c73b2843..8ae30021 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -342,7 +342,7 @@ static void _menu_edit_P(void) } if (LCD_CLICKED) { - *((int*)(_md->editValue)) = (int)lcd_encoder; + *((T)(_md->editValue)) = lcd_encoder; menu_back_no_reset(); } } From 5fe6a3ed1c468b750e259c3fa1caf8e27b9b6db8 Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Fri, 24 Aug 2018 22:04:48 +0200 Subject: [PATCH 8/8] Place similar functions together. --- Firmware/menu.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index 8ae30021..bd523826 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -286,6 +286,27 @@ void menu_draw_P(char chr, const char* str, int16_t val) lcd_printf_P(menu_fmt_int3, chr, str, spaces, val); } +template<> +void menu_draw_P(char chr, const char* str, int16_t val) +{ + menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); + int text_len = strlen_P(str); + if (text_len > 15) text_len = 15; + char spaces[21]; + strcpy_P(spaces, menu_20x_space); + spaces[12 - text_len] = 0; + float factor = 1.0 + static_cast(val) / 1000.0; + if (val <= _md->minEditValue) + { + lcd_printf_P(menu_fmt_float13off, chr, str, spaces); + lcd_puts_P(_i(" [off]")); + } + else + { + lcd_printf_P(menu_fmt_float13, chr, str, spaces, factor); + } +} + //draw up to 12 chars of text, ':' and float number in format +123.0 void menu_draw_float31(char chr, const char* str, float val) { @@ -308,27 +329,6 @@ void menu_draw_float13(char chr, const char* str, float val) lcd_printf_P(menu_fmt_float13, chr, str, spaces, val); } -template<> -void menu_draw_P(char chr, const char* str, int16_t val) -{ - menu_data_edit_t* _md = (menu_data_edit_t*)&(menu_data[0]); - int text_len = strlen_P(str); - if (text_len > 15) text_len = 15; - char spaces[21]; - strcpy_P(spaces, menu_20x_space); - spaces[12 - text_len] = 0; - float factor = 1.0 + static_cast(val) / 1000.0; - if (val <= _md->minEditValue) - { - lcd_printf_P(menu_fmt_float13off, chr, str, spaces); - lcd_puts_P(_i(" [off]")); - } - else - { - lcd_printf_P(menu_fmt_float13, chr, str, spaces, factor); - } -} - template static void _menu_edit_P(void) {