Bug fixes.

- G38.x was not printing correctly in the $G g-code state reports. Now
fixed.

- When investigating the above issue, it was noticed that G38.x
wouldn’t show at all, but instead a G0 would be printed. This was
unlike the v0.9j master build. It turned out volatile variables do not
like to be defined inside a C struct. These are undefined on how to be
handled. Once pulled out, all weird issues went away.

- Also changed two ‘sizeof()’ statements in the mc_probe() and
probe_state_monitor() functions to be more robust later on.

- Updated the commit logs to individual files for each minor release.
Forgot to update the generating script to account for this.
This commit is contained in:
Sonny Jeon
2015-09-30 21:32:58 -06:00
15 changed files with 183 additions and 142 deletions

View File

@ -220,7 +220,7 @@ void mc_homing_cycle()
#ifdef LIMITS_TWO_SWITCHES_ON_AXES
if (limits_get_state()) {
mc_reset(); // Issue system reset and ensure spindle and coolant are shutdown.
bit_true_atomic(sys.rt_exec_alarm, (EXEC_ALARM_HARD_LIMIT|EXEC_CRITICAL_EVENT));
bit_true_atomic(sys_rt_exec_alarm, (EXEC_ALARM_HARD_LIMIT|EXEC_CRITICAL_EVENT));
return;
}
#endif
@ -276,7 +276,7 @@ void mc_homing_cycle()
// After syncing, check if probe is already triggered. If so, halt and issue alarm.
// NOTE: This probe initialization error applies to all probing cycles.
if ( probe_get_state() ) { // Check probe pin state.
bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_PROBE_FAIL);
bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_PROBE_FAIL);
protocol_execute_realtime();
}
if (sys.abort) { return; } // Return if system reset has been issued.
@ -289,10 +289,10 @@ void mc_homing_cycle()
#endif
// Activate the probing state monitor in the stepper module.
sys.probe_state = PROBE_ACTIVE;
sys_probe_state = PROBE_ACTIVE;
// Perform probing cycle. Wait here until probe is triggered or motion completes.
bit_true_atomic(sys.rt_exec_state, EXEC_CYCLE_START);
bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START);
do {
protocol_execute_realtime();
if (sys.abort) { return; } // Check for system abort
@ -301,13 +301,13 @@ void mc_homing_cycle()
// Probing cycle complete!
// Set state variables and error out, if the probe failed and cycle with error is enabled.
if (sys.probe_state == PROBE_ACTIVE) {
if (is_no_error) { memcpy(sys.probe_position, sys.position, sizeof(float)*N_AXIS); }
else { bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_PROBE_FAIL); }
if (sys_probe_state == PROBE_ACTIVE) {
if (is_no_error) { memcpy(sys.probe_position, sys.position, sizeof(sys.position)); }
else { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_PROBE_FAIL); }
} else {
sys.probe_succeeded = true; // Indicate to system the probing cycle completed successfully.
}
sys.probe_state = PROBE_OFF; // Ensure probe state monitor is disabled.
sys_probe_state = PROBE_OFF; // Ensure probe state monitor is disabled.
protocol_execute_realtime(); // Check and execute run-time commands
if (sys.abort) { return; } // Check for system abort
@ -365,8 +365,8 @@ void mc_parking_motion(float *parking_target, float feed_rate)
void mc_reset()
{
// Only this function can set the system reset. Helps prevent multiple kill calls.
if (bit_isfalse(sys.rt_exec_state, EXEC_RESET)) {
bit_true_atomic(sys.rt_exec_state, EXEC_RESET);
if (bit_isfalse(sys_rt_exec_state, EXEC_RESET)) {
bit_true_atomic(sys_rt_exec_state, EXEC_RESET);
// Kill spindle and coolant.
spindle_stop();
@ -378,8 +378,8 @@ void mc_reset()
// violated, by which, all bets are off.
if ((sys.state & (STATE_CYCLE | STATE_HOMING)) ||
(sys.step_control & (STEP_CONTROL_EXECUTE_HOLD | STEP_CONTROL_EXECUTE_PARK))) {
if (sys.state == STATE_HOMING) { bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_HOMING_FAIL); }
else { bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE); }
if (sys.state == STATE_HOMING) { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_HOMING_FAIL); }
else { bit_true_atomic(sys_rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE); }
st_go_idle(); // Force kill steppers. Position has likely been lost.
}
}