Minor bug fixes.
- Bug fix for step and direction invert masks not immediately being in effect. Now regenerates the masks when a user changes this setting. - Bug fix for probing cycle. G-code standard mandates that there is an error if the probe is already triggered when the cycle is commanded. However, Grbl may have motions to pull off a previous probing cycle in queue and can falsely lead to errors. To fix this, the triggered check is performed within the probing cycle itself, right after the planner buffer is synced. If there is an error, it will now alarm out as a probe fail.
This commit is contained in:
11
settings.c
11
settings.c
@ -25,6 +25,7 @@
|
||||
#include "protocol.h"
|
||||
#include "report.h"
|
||||
#include "limits.h"
|
||||
#include "stepper.h"
|
||||
|
||||
settings_t settings;
|
||||
|
||||
@ -194,8 +195,14 @@ uint8_t settings_store_global_setting(uint8_t parameter, float value) {
|
||||
if (int_value < 3) { return(STATUS_SETTING_STEP_PULSE_MIN); }
|
||||
settings.pulse_microseconds = int_value; break;
|
||||
case 1: settings.stepper_idle_lock_time = int_value; break;
|
||||
case 2: settings.step_invert_mask = int_value; break;
|
||||
case 3: settings.dir_invert_mask = int_value; break;
|
||||
case 2:
|
||||
settings.step_invert_mask = int_value;
|
||||
st_generate_step_dir_invert_masks(); // Regenerate step and direction port invert masks.
|
||||
break;
|
||||
case 3:
|
||||
settings.dir_invert_mask = int_value;
|
||||
st_generate_step_dir_invert_masks(); // Regenerate step and direction port invert masks.
|
||||
break;
|
||||
case 4: // Reset to ensure change. Immediate re-init may cause problems.
|
||||
if (int_value) { settings.flags |= BITFLAG_INVERT_ST_ENABLE; }
|
||||
else { settings.flags &= ~BITFLAG_INVERT_ST_ENABLE; }
|
||||
|
Reference in New Issue
Block a user