diff --git a/Grbl_Esp32/src/Grbl.cpp b/Grbl_Esp32/src/Grbl.cpp index 68b86227..fc919a3c 100644 --- a/Grbl_Esp32/src/Grbl.cpp +++ b/Grbl_Esp32/src/Grbl.cpp @@ -134,23 +134,23 @@ void WEAK_FUNC display_init() {} void WEAK_FUNC user_m30() {} void WEAK_FUNC user_tool_change(uint8_t new_tool) {} + #ifdef NATIVE // setup() and loop() in the Arduino .ino implements this control flow: -# ifdef EMIT_YAML -# include "System.h" -# endif -int main(int arc, char** argv) { - grbl_init(); // setup() +void setup() { + grbl_init(); +} +void loop() { # ifdef EMIT_YAML char line[10]; strcpy(line, "$cd"); system_execute_line(line, uint8_t(CLIENT_SERIAL), WebUI::AuthenticationLevel::LEVEL_ADMIN); Uart0.flush(); + exit(0); # else - while (1) { // loop() - run_once(); - } + run_once(); # endif } + #endif diff --git a/Grbl_Esp32/src/Motors/TrinamicUartDriver.h b/Grbl_Esp32/src/Motors/TrinamicUartDriver.h index e932d57e..0c88bb4e 100644 --- a/Grbl_Esp32/src/Motors/TrinamicUartDriver.h +++ b/Grbl_Esp32/src/Motors/TrinamicUartDriver.h @@ -97,7 +97,7 @@ namespace Motors { bool set_homing_mode(bool is_homing) override; void set_disable(bool disable) override; - const char* name() override { return _driver_part_number == 2008 ? "tmc_2008" : "tmc_2009"; } + const char* name() override { return _driver_part_number == 2208 ? "tmc_2208" : "tmc_2209"; } uint8_t addr;