Browse Source

change nx, ny, nz and ne from float to long

st_set_position takes long
```void st_set_position(const long& x, const long& y, const long& z, const long& e)```
Wurstnase 9 years ago
parent
commit
78a347a01a
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      Marlin/planner.cpp

+ 4
- 4
Marlin/planner.cpp View File

@@ -1029,10 +1029,10 @@ float junction_deviation = 0.1;
1029 1029
       apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
1030 1030
     #endif
1031 1031
 
1032
-    float nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
1033
-          ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]),
1034
-          nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]),
1035
-          ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
1032
+    long nx = position[X_AXIS] = lround(x * axis_steps_per_unit[X_AXIS]),
1033
+         ny = position[Y_AXIS] = lround(y * axis_steps_per_unit[Y_AXIS]),
1034
+         nz = position[Z_AXIS] = lround(z * axis_steps_per_unit[Z_AXIS]),
1035
+         ne = position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
1036 1036
     st_set_position(nx, ny, nz, ne);
1037 1037
     previous_nominal_speed = 0.0; // Resets planner junction speeds. Assumes start from rest.
1038 1038
 

Loading…
Cancel
Save