Move T (tool change) to cpp

This commit is contained in:
Scott Lahteine
2017-09-18 01:05:44 -05:00
parent 927524af6b
commit 07cf75883f
6 changed files with 24 additions and 20 deletions

View File

@ -20,15 +20,20 @@
*
*/
#include "../gcode.h"
#include "../../module/tool_change.h"
#if ENABLED(DEBUG_LEVELING_FEATURE) || HOTENDS > 1
#include "../../module/motion.h"
#endif
/**
* T0-T3: Switch tool, usually switching extruders
*
* F[units/min] Set the movement feedrate
* S1 Don't move the tool in XY after change
*/
void gcode_T(uint8_t tmp_extruder) {
void GcodeSuite::T(const uint8_t tmp_extruder) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {

View File

@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
//
// Placeholders for non-migrated codes
//
extern void gcode_T(uint8_t tmp_extruder);
#if ENABLED(M100_FREE_MEMORY_WATCHER)
extern void M100_dump_routine(const char * const title, const char *start, const char *end);
#endif
@ -690,9 +688,7 @@ void GcodeSuite::process_next_command() {
}
break;
case 'T':
gcode_T(parser.codenum);
break;
case 'T': T(parser.codenum); break; // Tn: Tool Change
default: parser.unknown_command_error();
}

View File

@ -722,7 +722,7 @@ private:
static void M999();
static void T(uint8_t tmp_extruder);
static void T(const uint8_t tmp_extruder);
};