Ver Fonte

Purge ftostr3

Saves 54 bytes of Flash and 2 bytes of SRAM
Guðni Már Gilbert há 2 anos atrás
pai
commit
efde923e57
2 ficheiros alterados com 5 adições e 11 exclusões
  1. 1 1
      Firmware/Marlin_main.cpp
  2. 4 10
      Firmware/ultralcd.cpp

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -11956,7 +11956,7 @@ void M600_wait_for_user(float HotendTempBckp) {
 				else {
 					counterBeep = 20; //beeper will be inactive during waiting for nozzle preheat
 					lcd_set_cursor(1, 4);
-					lcd_print(ftostr3(degHotend(active_extruder)));
+					lcd_printf_P(PSTR("%3d"), (int16_t)degHotend(active_extruder));
 				}
 				break;
 

+ 4 - 10
Firmware/ultralcd.cpp

@@ -2891,9 +2891,7 @@ bool lcd_wait_for_pinda(float temp) {
 
 		lcd_set_cursor(0, 4);
 		lcd_print(LCD_STR_THERMOMETER[0]);
-		lcd_print(ftostr3(current_temperature_pinda));
-		lcd_print('/');
-		lcd_print(ftostr3(temp));
+		lcd_printf_P(PSTR("%3d/%3d"), (int16_t)current_temperature_pinda, (int16_t) temp);
 		lcd_print(LCD_STR_DEGREE[0]);
 		delay_keep_alive(1000);
 		serialecho_temperatures();
@@ -2911,9 +2909,7 @@ void lcd_wait_for_heater() {
 		lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));
 		lcd_set_cursor(0, 4);
 		lcd_print(LCD_STR_THERMOMETER[0]);
-		lcd_print(ftostr3(degHotend(active_extruder)));
-		lcd_print('/');
-		lcd_print(ftostr3(degTargetHotend(active_extruder)));
+		lcd_printf_P(PSTR("%3d/%3d"), (int16_t)degHotend(active_extruder), (int16_t) degTargetHotend(active_extruder));
 		lcd_print(LCD_STR_DEGREE[0]);
 }
 
@@ -2927,14 +2923,12 @@ void lcd_wait_for_cool_down() {
 
 		lcd_set_cursor(0, 4);
 		lcd_print(LCD_STR_THERMOMETER[0]);
-		lcd_print(ftostr3(degHotend(0)));
-		lcd_print("/0");		
+		lcd_printf_P(PSTR("%3d/0"), (int16_t)degHotend(0));
 		lcd_print(LCD_STR_DEGREE[0]);
 
 		lcd_set_cursor(9, 4);
 		lcd_print(LCD_STR_BEDTEMP[0]);
-		lcd_print(ftostr3(degBed()));
-		lcd_print("/0");		
+		lcd_printf_P(PSTR("%3d/0"), (int16_t)degBed());
 		lcd_print(LCD_STR_DEGREE[0]);
 		delay_keep_alive(1000);
 		serialecho_temperatures();