current_position not static

master
Scott Lahteine 10 years ago
parent 27cb90da8b
commit 3162971cd6

@ -205,7 +205,7 @@
bool Running = true; bool Running = true;
static float feedrate = 1500.0, next_feedrate, saved_feedrate; static float feedrate = 1500.0, next_feedrate, saved_feedrate;
static float current_position[NUM_AXIS] = { 0.0 }; float current_position[NUM_AXIS] = { 0.0 };
static float destination[NUM_AXIS] = { 0.0 }; static float destination[NUM_AXIS] = { 0.0 };
bool axis_known_position[3] = { false }; bool axis_known_position[3] = { false };

@ -87,7 +87,7 @@ unsigned long axis_steps_per_sqr_second[NUM_AXIS];
0.0, 1.0, 0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 1.0 0.0, 0.0, 1.0
}; };
#endif // #ifdef ENABLE_AUTO_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING
// The current position of the tool in absolute steps // The current position of the tool in absolute steps
long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_unit are changed by gcode long position[NUM_AXIS]; //rescaled from extern when axis_steps_per_unit are changed by gcode
@ -487,9 +487,7 @@ float junction_deviation = 0.1;
#ifdef MESH_BED_LEVELING #ifdef MESH_BED_LEVELING
if (mbl.active) z += mbl.get_z(x, y); if (mbl.active) z += mbl.get_z(x, y);
#endif #elif defined(ENABLE_AUTO_BED_LEVELING)
#ifdef ENABLE_AUTO_BED_LEVELING
apply_rotation_xyz(plan_bed_level_matrix, x, y, z); apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
@ -979,10 +977,10 @@ float junction_deviation = 0.1;
void plan_set_position(const float &x, const float &y, const float &z, const float &e) void plan_set_position(const float &x, const float &y, const float &z, const float &e)
#endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING #endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING
{ {
#ifdef ENABLE_AUTO_BED_LEVELING #ifdef MESH_BED_LEVELING
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#elif defined(MESH_BED_LEVELING)
if (mbl.active) z += mbl.get_z(x, y); if (mbl.active) z += mbl.get_z(x, y);
#elif defined(ENABLE_AUTO_BED_LEVELING)
apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
#endif #endif
float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]); float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]);

Loading…
Cancel
Save