From d4ac1becf6e7a857a85017d231c53916154faf82 Mon Sep 17 00:00:00 2001 From: bdring Date: Fri, 5 Mar 2021 11:59:56 -0600 Subject: [PATCH] Get next rmt chan num fix (#793) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial release with custom machine * initial release * Wrong addition corrected. AmoutOfToolChanges counts up now. * pressing Z probe button once is fine, not a second time. reporting not in sequence to function flow * First working FreeRTOS task with static text. Send "471" every second to all outputs * Z Probe triggered correctly at button pressed. Can read out all values * gitignore * running with state machine, repeatable results in test environment * works, except that function "user_tool_change" starts the tool change and it will interfer with further g code running in parallel. tbd * typo * back to without RTOS.But doesnt move * RTOS but only with "T1 m06". not with g code program * hold is better than door * initial wifi settings * umlaute * gitignore * Fehler bei Limit_Mask * Spindle_Type angepasst * lower debounding after adding capacitor * Revert "lower debounding after adding capacitor" This reverts commit eadbec23596bf6b46ec750a5ae519e8f1893876e. * remove customized gitignore * Revert "remove customized gitignore" This reverts commit ce44131c7afdb53964067073e4a52ab8e3fe8f4b. * reduce debounding period due to adding capacitor * uncomment all tool change source code * Tets Fräse 2.6 ok * Fräse 2.6 * Falscher GPIO Pin für Fräse * test * Revert "test" This reverts commit 1265435786eb327226553c5178f942cd96f08888. * No Bluetooth necessary * OTA update (watch Windows firewall!) * - rename custom machine file name -added "4axis_xyza.txt" to store Grbl_ESP32 config parameters. So programming fits to parameters - added 2 buttons (#1 hold/resume), #2 homing and tool change position * new Z probe button * Z probe corretion * Z probe correction * Z probe correction * Fixed Grbl.h - I think I deleted the GRBL_VERSION line by accident when using the web based conflict editor * Revert "Merge branch 'Devt' of https://github.com/bdring/Grbl_Esp32 into Devt" This reverts commit 361558b6b74f1ab6ae60fa250207081b941f6c20, reversing changes made to 811646f5e77ce838082ee3c89a5ea99aa6ef9fd5. * Revert "Merge remote-tracking branch 'Grbl_Esp32_JH/master' into Devt" This reverts commit 811646f5e77ce838082ee3c89a5ea99aa6ef9fd5, reversing changes made to a61ab51c0bab36195644f7438dc82e84af32a5a9. * Update - moved get_next_RMT_chan_num() to constructor - [Discord discussion](https://discord.com/channels/780079161460916227/786364602223951882/817056437016592384) Co-authored-by: Jens Hauser <44340656+JensHauser@users.noreply.github.com> Co-authored-by: Mitch Bradley Co-authored-by: JensHauser --- Grbl_Esp32/src/Grbl.h | 2 +- Grbl_Esp32/src/Motors/StandardStepper.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/Grbl.h b/Grbl_Esp32/src/Grbl.h index 2172f344..1d3e57e3 100644 --- a/Grbl_Esp32/src/Grbl.h +++ b/Grbl_Esp32/src/Grbl.h @@ -22,7 +22,7 @@ // Grbl versioning system const char* const GRBL_VERSION = "1.3a"; -const char* const GRBL_VERSION_BUILD = "20210304"; +const char* const GRBL_VERSION_BUILD = "20210305"; //#include #include diff --git a/Grbl_Esp32/src/Motors/StandardStepper.cpp b/Grbl_Esp32/src/Motors/StandardStepper.cpp index 68803a46..3f5a91da 100644 --- a/Grbl_Esp32/src/Motors/StandardStepper.cpp +++ b/Grbl_Esp32/src/Motors/StandardStepper.cpp @@ -40,7 +40,11 @@ namespace Motors { } StandardStepper::StandardStepper(uint8_t axis_index, uint8_t step_pin, uint8_t dir_pin, uint8_t disable_pin) : - Motor(axis_index), _step_pin(step_pin), _dir_pin(dir_pin), _disable_pin(disable_pin) {} + Motor(axis_index), _step_pin(step_pin), _dir_pin(dir_pin), _disable_pin(disable_pin) { +#ifdef USE_RMT_STEPS + _rmt_chan_num = get_next_RMT_chan_num(); +#endif + } void StandardStepper::init() { read_settings(); @@ -72,7 +76,6 @@ namespace Motors { rmtItem[1].duration0 = 0; rmtItem[1].duration1 = 0; - _rmt_chan_num = get_next_RMT_chan_num(); if (_rmt_chan_num == RMT_CHANNEL_MAX) { return; }