From 3ab57086b15975bc4f75fac3dcafdcf598e64772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Thu, 24 Feb 2022 00:56:27 +0000 Subject: [PATCH] Remove one call to dtostrf I could not see any difference in the functionality when testing this locally Changes save 818 bytes of flash memory (I suspect this is due to dtostrf no longer being called in the firmware for MK3S?) --- Firmware/Marlin_main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index b069a8c48..aff3fa62a 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -11462,8 +11462,7 @@ void restore_print_from_eeprom(bool mbl_was_active) { enquecommand(cmd); // Recover final E axis position and mode float pos_e = eeprom_read_float((float*)(EEPROM_UVLO_CURRENT_POSITION_E)); - sprintf_P(cmd, PSTR("G92 E")); - dtostrf(pos_e, 6, 3, cmd + strlen(cmd)); + sprintf_P(cmd, PSTR("G92 E%6.3f"), pos_e); enquecommand(cmd); if (eeprom_read_byte((uint8_t*)EEPROM_UVLO_E_ABS)) enquecommand_P(PSTR("M82")); //E axis abslute mode