From e0588ee377ce82fcabfed45bcf3a7ab6ad4a5058 Mon Sep 17 00:00:00 2001 From: bdring Date: Tue, 29 Sep 2020 13:48:13 -0500 Subject: [PATCH] Fix G28.1 and G30.1 --- Grbl_Esp32/src/GCode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Grbl_Esp32/src/GCode.cpp b/Grbl_Esp32/src/GCode.cpp index 8d5391e2..8031c95e 100644 --- a/Grbl_Esp32/src/GCode.cpp +++ b/Grbl_Esp32/src/GCode.cpp @@ -142,7 +142,7 @@ Error gc_execute_line(char* line, uint8_t client) { uint8_t gc_parser_flags = GCParserNone; auto n_axis = number_axis->get(); float coord_data[MAX_N_AXIS]; // Used by WCO-related commands - uint8_t pValue; // Integer value of P word + uint8_t pValue; // Integer value of P word // Determine if the line is a jogging motion or a normal g-code block. if (line[0] == '$') { // NOTE: `$J=` already parsed when passed to this function. @@ -1478,10 +1478,10 @@ Error gc_execute_line(char* line, uint8_t client) { memcpy(gc_state.position, coord_data, sizeof(gc_state.position)); break; case NonModal::SetHome0: - coords[CoordIndex::G28]->set(coord_data); + coords[CoordIndex::G28]->set(gc_state.position); break; case NonModal::SetHome1: - coords[CoordIndex::G30]->set(coord_data); + coords[CoordIndex::G30]->set(gc_state.position); break; case NonModal::SetCoordinateOffset: memcpy(gc_state.coord_offset, gc_block.values.xyz, sizeof(gc_block.values.xyz));