From 9f5365aac9ed8b79e767d8a811fa1a01f74ce75d Mon Sep 17 00:00:00 2001 From: Simen Svale Skogsrud Date: Fri, 4 Feb 2011 23:48:10 +0100 Subject: [PATCH] fixed a bug where F-commands never would modify feed-rate of G0-operations --- gcode.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gcode.c b/gcode.c index 9c7c87d..9649a0c 100644 --- a/gcode.c +++ b/gcode.c @@ -217,8 +217,12 @@ uint8_t gc_execute_line(char *line) { case 'F': if (gc.inverse_feed_rate_mode) { inverse_feed_rate = unit_converted_value; // seconds per motion for this motion only - } else { - gc.feed_rate = unit_converted_value/60; // millimeters pr second + } else { + if (gc.motion_mode == MOTION_MODE_SEEK) { + gc.seek_rate = unit_converted_value/60; + } else { + gc.feed_rate = unit_converted_value/60; // millimeters pr second + } } break; case 'I': case 'J': case 'K': offset[letter-'I'] = unit_converted_value; break;