From 8b92249f18d0cce9f05e304777e13c0e1a5655b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 13 May 2015 19:00:46 -0700 Subject: [PATCH] Bring arc_offset into auto scope --- Marlin/Marlin_main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 03587ab56b..d94f04fa1a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -257,7 +257,6 @@ const char errormagic[] PROGMEM = "Error:"; const char echomagic[] PROGMEM = "echo:"; const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; -static float arc_offset[3] = { 0 }; static bool relative_mode = false; //Determines Absolute or Relative Coordinates static char serial_char; static int serial_count = 0; @@ -1957,8 +1956,10 @@ inline void gcode_G2_G3(bool clockwise) { #endif // Center of arc as offset from current_position - arc_offset[0] = code_seen('I') ? code_value() : 0; - arc_offset[1] = code_seen('J') ? code_value() : 0; + float arc_offset[2] = { + code_seen('I') ? code_value() : 0, + code_seen('J') ? code_value() : 0 + }; // Send an arc to the planner plan_arc(destination, arc_offset, clockwise);