소스 검색

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?)
Guðni Már Gilbert 2 년 전
부모
커밋
3ab57086b1
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      Firmware/Marlin_main.cpp

+ 1 - 2
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