From e4d8cf511e8db1366167c1a829c177f6e8ba2bd3 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Sun, 25 Nov 2012 11:08:38 -0700 Subject: [PATCH] G28/G30 post move bug fix. - Fixed a bug when after moving to a pre-defined position G28/G30, the next move would go someplace unexpected. The g-code parser position vector wasn't getting updated. --- gcode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcode.c b/gcode.c index 7c6d17d..c741fc2 100755 --- a/gcode.c +++ b/gcode.c @@ -332,6 +332,7 @@ uint8_t gc_execute_line(char *line) if (non_modal_action == NON_MODAL_GO_HOME_1) { home_select = SETTING_INDEX_G30; } if (!settings_read_coord_data(home_select,coord_data)) { return(STATUS_SETTING_READ_FAIL); } mc_line(coord_data[X_AXIS], coord_data[Y_AXIS], coord_data[Z_AXIS], settings.default_seek_rate, false); + memcpy(gc.position, coord_data, sizeof(coord_data)); // gc.position[] = coord_data[]; axis_words = 0; // Axis words used. Lock out from motion modes by clearing flags. break; case NON_MODAL_SET_HOME_0: case NON_MODAL_SET_HOME_1: