Add a feedRate_t data type (#15349)

This commit is contained in:
Scott Lahteine
2019-09-26 01:28:09 -05:00
committed by GitHub
parent ee7558a622
commit 455dabb183
42 changed files with 384 additions and 377 deletions

View File

@@ -45,8 +45,10 @@ void GcodeSuite::G42() {
}
set_destination_from_current();
if (hasI) destination[X_AXIS] = _GET_MESH_X(ix);
if (hasJ) destination[Y_AXIS] = _GET_MESH_Y(iy);
#if HAS_BED_PROBE
if (parser.boolval('P')) {
if (hasI) destination[X_AXIS] -= probe_offset[X_AXIS];
@@ -54,14 +56,14 @@ void GcodeSuite::G42() {
}
#endif
const float fval = parser.linearval('F');
if (fval > 0.0) feedrate_mm_s = MMM_TO_MMS(fval);
const feedRate_t fval = parser.linearval('F'),
fr_mm_s = fval > 0 ? MMM_TO_MMS(fval) : 0.0f;
// SCARA kinematic has "safe" XY raw moves
#if IS_SCARA
prepare_uninterpolated_move_to_destination();
prepare_internal_fast_move_to_destination(fr_mm_s);
#else
prepare_move_to_destination();
prepare_internal_move_to_destination(fr_mm_s);
#endif
}
}