* Get the target extruder from the T parameter or the active_extruder * Return -1 if the T parameter is out of range */
| 122 | * Return -1 if the T parameter is out of range |
| 123 | */ |
| 124 | int8_t GcodeSuite::get_target_extruder_from_command() { |
| 125 | #if HAS_TOOLCHANGE |
| 126 | if (parser.seenval('T')) { |
| 127 | const int8_t e = parser.value_byte(); |
| 128 | if (e < EXTRUDERS) return e; |
| 129 | SERIAL_ECHO_START(); |
| 130 | SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); |
| 131 | SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); |
| 132 | return -1; |
| 133 | } |
| 134 | #endif |
| 135 | return active_extruder; |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Get the target E stepper from the 'T' parameter. |
nothing calls this directly
no test coverage detected