Fixed arc feedhold error; fixed a bug in G28/G30 return when converting units for rotary axes

This commit is contained in:
Alden Hart
2017-04-30 11:11:58 -04:00
parent 6d8d925195
commit 6d5cdf219e
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1183,7 +1183,7 @@ stat_t _goto_stored_position(const float stored_position[], // always in mm
copy_vector(target, stored_position);
if (cm->gm.units_mode == INCHES) {
for (uint8_t i=0; i<AXES; i++) {
for (uint8_t i=0; i<AXIS_A; i++) { // Only convert linears (not rotaries)
target[i] *= INCHES_PER_MM;
}
}
+5 -4
View File
@@ -576,6 +576,7 @@ static void _enter_p2()
cm2.gm.absolute_override = ABSOLUTE_OVERRIDE_OFF;
cm2.queue_flush_state = QUEUE_FLUSH_OFF;
cm2.gm.feed_rate = 0;
cm2.arc.run_state = BLOCK_INACTIVE; // Stop a running p1 arc from continuing to execute in p2
// Set mp planner to p2 and reset it
cm2.mp = &mp2;
@@ -598,15 +599,15 @@ static void _enter_p2()
// Reassign the globals to the secondary CM
cm = &cm2;
mp = (mpPlanner_t *)cm->mp; // mp is a void pointer
mr = mp->mr;
mp = (mpPlanner_t *)cm2.mp; // mp is a void pointer
mr = mp2.mr;
}
static void _exit_p2()
{
cm = &cm1; // return to primary planner (p1)
mp = (mpPlanner_t *)cm->mp; // cm->mp is a void pointer
mr = mp->mr;
mp = (mpPlanner_t *)cm1.mp; // cm->mp is a void pointer
mr = mp1.mr;
}
static void _check_motion_stopped()