From 1c2dc4bfc52f3a2e3c5f139e2b9f7e3ee7441761 Mon Sep 17 00:00:00 2001 From: Terje Io Date: Sat, 29 Jan 2022 14:00:52 +0100 Subject: [PATCH] Fixed incorrect handling of spindle stop on "stop" command --- gcode.c | 6 +++++- grbl.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcode.c b/gcode.c index d3c5d7f..56d13c5 100644 --- a/gcode.c +++ b/gcode.c @@ -334,7 +334,11 @@ void gc_spindle_off (void) { gc_state.spindle.rpm = 0.0f; gc_state.modal.spindle.value = 0; - spindle_set_state(gc_state.modal.spindle, gc_state.spindle.rpm); +#ifndef GRBL_ESP32 + hal.spindle.set_state(gc_state.modal.spindle, 0.0f); +#else + hal.spindle.esp32_off(); +#endif sys.report.spindle = On; } diff --git a/grbl.h b/grbl.h index 838fddd..946eb08 100644 --- a/grbl.h +++ b/grbl.h @@ -34,7 +34,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20220123 +#define GRBL_BUILD 20220129 // The following symbols are set here if not already set by the compiler or in config.h // Do NOT change here!