Browse Source

Bring arc_offset into auto scope

Scott Lahteine 10 years ago
parent
commit
8b92249f18
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      Marlin/Marlin_main.cpp

+ 4
- 3
Marlin/Marlin_main.cpp View File

@@ -257,7 +257,6 @@ const char errormagic[] PROGMEM = "Error:";
257 257
 const char echomagic[] PROGMEM = "echo:";
258 258
 const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
259 259
 
260
-static float arc_offset[3] = { 0 };
261 260
 static bool relative_mode = false;  //Determines Absolute or Relative Coordinates
262 261
 static char serial_char;
263 262
 static int serial_count = 0;
@@ -1957,8 +1956,10 @@ inline void gcode_G2_G3(bool clockwise) {
1957 1956
     #endif
1958 1957
 
1959 1958
     // Center of arc as offset from current_position
1960
-    arc_offset[0] = code_seen('I') ? code_value() : 0;
1961
-    arc_offset[1] = code_seen('J') ? code_value() : 0;
1959
+    float arc_offset[2] = {
1960
+      code_seen('I') ? code_value() : 0,
1961
+      code_seen('J') ? code_value() : 0
1962
+    };
1962 1963
 
1963 1964
     // Send an arc to the planner
1964 1965
     plan_arc(destination, arc_offset, clockwise);

Loading…
Cancel
Save