From 094e4b0b9eb6300e6ab52384e441baf03f7e0e69 Mon Sep 17 00:00:00 2001 From: Jens Hauser <44340656+JensHauser@users.noreply.github.com> Date: Sat, 17 Oct 2020 01:52:32 +0200 Subject: [PATCH] uncomment all tool change source code --- Grbl_Esp32/Custom/4axis_xyxz.cpp | 25 ++++++++++++++----------- Grbl_Esp32/Machines/4axis_xyxz.h | 4 +--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Grbl_Esp32/Custom/4axis_xyxz.cpp b/Grbl_Esp32/Custom/4axis_xyxz.cpp index 1883dd99..2f3fa284 100644 --- a/Grbl_Esp32/Custom/4axis_xyxz.cpp +++ b/Grbl_Esp32/Custom/4axis_xyxz.cpp @@ -8,7 +8,7 @@ //TODO describe this Tool change function called by G code "T[1..n] M06". Not triggered by G38.2 or ESP3D probe function :-) - first Z probe before tool change. Only executed once, because then we´ll know the initial Z height. + first Z probe before tool change. Only executed once, because then we�ll know the initial Z height. // second Z probe after tool change. Now we can compare //TODO parameterise this @@ -24,7 +24,7 @@ /* VARIABLES */ -uint8_t AmountOfToolChanges; // Each new tool increases this by 1. Before first tool, it´s 0. +uint8_t AmountOfToolChanges; // Each new tool increases this by 1. Before first tool, it�s 0. uint8_t currenttoolNo, newtoolNo; float firstZPos, newZPos, Zdiff; static TaskHandle_t zProbeSyncTaskHandle = NULL; @@ -74,6 +74,7 @@ void machine_init() #endif // state machine +/* void zProbeSyncTask(void* pvParameters) { TickType_t xLastWakeTime; @@ -212,7 +213,7 @@ void zProbeSyncTask(void* pvParameters) } break; - // That´s it + // That�s it case TOOLCHANGE_FINISH: #ifdef DEBUG grbl_sendf (CLIENT_ALL, "zProbeSyncTask. TOOLCHANGE_FINISH. State=%d\r", tc_state); @@ -240,21 +241,20 @@ void zProbeSyncTask(void* pvParameters) } #ifdef USE_TOOL_CHANGE -/* - user_tool_change() is called when tool change gcode is received, - to perform appropriate actions for your machine. +// +// user_tool_change() is called when tool change gcode is received, +// to perform appropriate actions for your machine. - Prerequisite: add "#define USE_TOOL_CHANGE" to your machine.h file -*/ +// Prerequisite: add "#define USE_TOOL_CHANGE" to your machine.h file void user_tool_change(uint8_t new_tool) { - // let´s start with the state machine + // let�s start with the state machine newtoolNo = new_tool; tc_state = TOOLCHANGE_INIT; //TODO - // Nach Aufruf dieser Function wird gleich wieder zurcügkegeben in die aufrufende Function. + // Nach Aufruf dieser Function wird gleich wieder zurc�gkegeben in die aufrufende Function. // Ziel: Erst return, wenn wirklich beendet (RTOS!) return; } @@ -271,4 +271,7 @@ float getLastZProbePos() system_convert_array_steps_to_mpos(m_pos, lastZPosition); // convert to millimeters return m_pos[Z_AXIS]; -} \ No newline at end of file +} + + +*/ \ No newline at end of file diff --git a/Grbl_Esp32/Machines/4axis_xyxz.h b/Grbl_Esp32/Machines/4axis_xyxz.h index c41cbc74..2bbefa95 100644 --- a/Grbl_Esp32/Machines/4axis_xyxz.h +++ b/Grbl_Esp32/Machines/4axis_xyxz.h @@ -73,6 +73,4 @@ //#define USE_MACHINE_INIT -//#define USE_TOOL_CHANGE - -void zProbeSyncTask(void* pvParameters); \ No newline at end of file +//#define USE_TOOL_CHANGE \ No newline at end of file