Browse Source

Merge pull request #3665 from thinkyhead/rc_stepper_babystep

Fix BABYSTEPPING, add it to Travis test
pull/1/head
Scott Lahteine 9 years ago
parent
commit
6bb664c690
  1. 4
      .travis.yml
  2. 12
      Marlin/planner.cpp
  3. 4
      Marlin/temperature.cpp

4
.travis.yml

@ -105,10 +105,10 @@ script:
#- opt_enable MAKRPANEL #- opt_enable MAKRPANEL
#- build_marlin #- build_marlin
# #
# REPRAP_DISCOUNT_SMART_CONTROLLER # REPRAP_DISCOUNT_SMART_CONTROLLER, SDSUPPORT, and BABYSTEPPING
# #
- restore_configs - restore_configs
- opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT - opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT BABYSTEPPING
- build_marlin - build_marlin
# #
# G3D_PANEL # G3D_PANEL

12
Marlin/planner.cpp

@ -1025,18 +1025,18 @@ void Planner::check_axes_activity() {
* On CORE machines XYZ is derived from ABC. * On CORE machines XYZ is derived from ABC.
*/ */
vector_3 Planner::adjusted_position() { vector_3 Planner::adjusted_position() {
vector_3 position = vector_3(stepper.get_axis_position_mm(X_AXIS), stepper.get_axis_position_mm(Y_AXIS), stepper.get_axis_position_mm(Z_AXIS)); vector_3 pos = vector_3(stepper.get_axis_position_mm(X_AXIS), stepper.get_axis_position_mm(Y_AXIS), stepper.get_axis_position_mm(Z_AXIS));
//position.debug("in Planner::position"); //pos.debug("in Planner::adjusted_position");
//bed_level_matrix.debug("in Planner::position"); //bed_level_matrix.debug("in Planner::adjusted_position");
matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix);
//inverse.debug("in Planner::inverse"); //inverse.debug("in Planner::inverse");
position.apply_rotation(inverse); pos.apply_rotation(inverse);
//position.debug("after rotation"); //pos.debug("after rotation");
return position; return pos;
} }
#endif // AUTO_BED_LEVELING_FEATURE && !DELTA #endif // AUTO_BED_LEVELING_FEATURE && !DELTA

4
Marlin/temperature.cpp

@ -1835,11 +1835,11 @@ ISR(TIMER0_COMPB_vect) {
int curTodo = babystepsTodo[axis]; //get rid of volatile for performance int curTodo = babystepsTodo[axis]; //get rid of volatile for performance
if (curTodo > 0) { if (curTodo > 0) {
babystep(axis,/*fwd*/true); stepper.babystep(axis,/*fwd*/true);
babystepsTodo[axis]--; //fewer to do next time babystepsTodo[axis]--; //fewer to do next time
} }
else if (curTodo < 0) { else if (curTodo < 0) {
babystep(axis,/*fwd*/false); stepper.babystep(axis,/*fwd*/false);
babystepsTodo[axis]++; //fewer to do next time babystepsTodo[axis]++; //fewer to do next time
} }
} }

Loading…
Cancel
Save