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:
@ -51,7 +51,7 @@ void protocol_main_loop()
|
||||
// All systems go! But first check for safety door.
|
||||
sys.state = STATE_IDLE;
|
||||
if (system_check_safety_door_ajar()) {
|
||||
bit_true(sys.rt_exec_state, EXEC_SAFETY_DOOR);
|
||||
bit_true(sys_rt_exec_state, EXEC_SAFETY_DOOR);
|
||||
protocol_execute_realtime(); // Enter safety door mode. Should return as IDLE state.
|
||||
}
|
||||
system_execute_startup(line); // Execute startup script.
|
||||
@ -190,7 +190,7 @@ void protocol_buffer_synchronize()
|
||||
// when one of these conditions exist respectively: There are no more blocks sent (i.e. streaming
|
||||
// is finished, single commands), a command that needs to wait for the motions in the buffer to
|
||||
// execute calls a buffer sync, or the planner buffer is full and ready to go.
|
||||
void protocol_auto_cycle_start() { bit_true_atomic(sys.rt_exec_state, EXEC_CYCLE_START); }
|
||||
void protocol_auto_cycle_start() { bit_true_atomic(sys_rt_exec_state, EXEC_CYCLE_START); }
|
||||
|
||||
|
||||
// This function is the general interface to Grbl's real-time command execution system. It is called
|
||||
@ -202,7 +202,7 @@ void protocol_auto_cycle_start() { bit_true_atomic(sys.rt_exec_state, EXEC_CYCLE
|
||||
// handles them, removing the need to define more computationally-expensive volatile variables. This
|
||||
// also provides a controlled way to execute certain tasks without having two or more instances of
|
||||
// the same task, such as the planner recalculating the buffer upon a feedhold or overrides.
|
||||
// NOTE: The sys.rt_exec_state variable flags are set by any process, step or serial interrupts, pinouts,
|
||||
// NOTE: The sys_rt_exec_state variable flags are set by any process, step or serial interrupts, pinouts,
|
||||
// limit switches, or the main program.
|
||||
void protocol_execute_realtime()
|
||||
{
|
||||
@ -217,7 +217,7 @@ void protocol_execute_realtime()
|
||||
void protocol_exec_rt_system()
|
||||
{
|
||||
uint8_t rt_exec; // Temp variable to avoid calling volatile multiple times.
|
||||
rt_exec = sys.rt_exec_alarm; // Copy volatile sys.rt_exec_alarm.
|
||||
rt_exec = sys_rt_exec_alarm; // Copy volatile sys_rt_exec_alarm.
|
||||
if (rt_exec) { // Enter only if any bit flag is true
|
||||
// System alarm. Everything has shutdown by something that has gone severely wrong. Report
|
||||
// the source of the error to the user. If critical, Grbl disables by entering an infinite
|
||||
@ -237,7 +237,7 @@ void protocol_exec_rt_system()
|
||||
// Halt everything upon a critical event flag. Currently hard and soft limits flag this.
|
||||
if (rt_exec & EXEC_CRITICAL_EVENT) {
|
||||
report_feedback_message(MESSAGE_CRITICAL_EVENT);
|
||||
bit_false_atomic(sys.rt_exec_state,EXEC_RESET); // Disable any existing reset
|
||||
bit_false_atomic(sys_rt_exec_state,EXEC_RESET); // Disable any existing reset
|
||||
do {
|
||||
// Block everything, except reset and status reports, until user issues reset or power
|
||||
// cycles. Hard limits typically occur while unattended or not paying attention. Gives
|
||||
@ -246,17 +246,17 @@ void protocol_exec_rt_system()
|
||||
// lost, streaming could cause a serious crash if it continues afterwards.
|
||||
|
||||
// TODO: Allow status reports during a critical alarm. Still need to think about implications of this.
|
||||
// if (sys.rt_exec_state & EXEC_STATUS_REPORT) {
|
||||
// if (sys_rt_exec_state & EXEC_STATUS_REPORT) {
|
||||
// report_realtime_status();
|
||||
// bit_false_atomic(sys.rt_exec_state,EXEC_STATUS_REPORT);
|
||||
// bit_false_atomic(sys_rt_exec_state,EXEC_STATUS_REPORT);
|
||||
// }
|
||||
|
||||
} while (bit_isfalse(sys.rt_exec_state,EXEC_RESET));
|
||||
} while (bit_isfalse(sys_rt_exec_state,EXEC_RESET));
|
||||
}
|
||||
bit_false_atomic(sys.rt_exec_alarm,0xFF); // Clear all alarm flags
|
||||
bit_false_atomic(sys_rt_exec_alarm,0xFF); // Clear all alarm flags
|
||||
}
|
||||
|
||||
rt_exec = sys.rt_exec_state; // Copy volatile sys.rt_exec_state.
|
||||
rt_exec = sys_rt_exec_state; // Copy volatile sys_rt_exec_state.
|
||||
if (rt_exec) {
|
||||
|
||||
// Execute system abort.
|
||||
@ -268,7 +268,7 @@ void protocol_exec_rt_system()
|
||||
// Execute and serial print status
|
||||
if (rt_exec & EXEC_STATUS_REPORT) {
|
||||
report_realtime_status();
|
||||
bit_false_atomic(sys.rt_exec_state,EXEC_STATUS_REPORT);
|
||||
bit_false_atomic(sys_rt_exec_state,EXEC_STATUS_REPORT);
|
||||
}
|
||||
|
||||
// NOTE: The math involved to calculate the hold should be low enough for most, if not all,
|
||||
@ -340,7 +340,7 @@ void protocol_exec_rt_system()
|
||||
|
||||
}
|
||||
|
||||
bit_false_atomic(sys.rt_exec_state,(EXEC_MOTION_CANCEL | EXEC_FEED_HOLD | EXEC_SAFETY_DOOR));
|
||||
bit_false_atomic(sys_rt_exec_state,(EXEC_MOTION_CANCEL | EXEC_FEED_HOLD | EXEC_SAFETY_DOOR));
|
||||
}
|
||||
|
||||
// Execute a cycle start by starting the stepper interrupt to begin executing the blocks in queue.
|
||||
@ -380,7 +380,7 @@ void protocol_exec_rt_system()
|
||||
}
|
||||
}
|
||||
}
|
||||
bit_false_atomic(sys.rt_exec_state,EXEC_CYCLE_START);
|
||||
bit_false_atomic(sys_rt_exec_state,EXEC_CYCLE_START);
|
||||
}
|
||||
|
||||
if (rt_exec & EXEC_CYCLE_STOP) {
|
||||
@ -399,7 +399,7 @@ void protocol_exec_rt_system()
|
||||
sys.suspend = SUSPEND_DISABLE;
|
||||
sys.state = STATE_IDLE;
|
||||
}
|
||||
bit_false_atomic(sys.rt_exec_state,EXEC_CYCLE_STOP);
|
||||
bit_false_atomic(sys_rt_exec_state,EXEC_CYCLE_STOP);
|
||||
}
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ static void protocol_exec_rt_suspend()
|
||||
|
||||
if (bit_isfalse(sys.suspend,SUSPEND_RESTART_RETRACT)) {
|
||||
sys.suspend |= SUSPEND_RESTORE_COMPLETE;
|
||||
bit_true_atomic(sys.rt_exec_state,EXEC_CYCLE_START); // Set to resume program.
|
||||
bit_true_atomic(sys_rt_exec_state,EXEC_CYCLE_START); // Set to resume program.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user