From 2120d17912286f8f7a60ec91229edd0d367e54ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 18 Feb 2023 12:45:48 +0000 Subject: [PATCH] optimisation: simplify T-code response for single material Extruder is always 0 Change in memory: Flash: -12 bytes SRAM: 0 bytes --- Firmware/Tcodes.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Firmware/Tcodes.cpp b/Firmware/Tcodes.cpp index c5453bd9e..a78010aec 100644 --- a/Firmware/Tcodes.cpp +++ b/Firmware/Tcodes.cpp @@ -79,8 +79,8 @@ void TCodes(char *const strchr_pointer, uint8_t codeValue) { } } } else { + SERIAL_ECHO_START; if (selectedSlot.slot >= EXTRUDERS) { - SERIAL_ECHO_START; SERIAL_ECHO('T'); SERIAL_ECHOLN(selectedSlot.slot + '0'); SERIAL_ECHOLNRPGM(_n("Invalid extruder")); ////MSG_INVALID_EXTRUDER @@ -91,9 +91,7 @@ void TCodes(char *const strchr_pointer, uint8_t codeValue) { // feedrate = next_feedrate; // } // } - SERIAL_ECHO_START; - SERIAL_ECHORPGM(_n("Active Extruder: ")); ////MSG_ACTIVE_EXTRUDER - SERIAL_ECHOLN(active_extruder + '0'); // this is not changed in our FW at all, can be optimized away + SERIAL_ECHORPGM(_n("Active Extruder: 0")); ////MSG_ACTIVE_EXTRUDER } } }