Added settings documentation. Very minor bug fix to step direction handling.

- Added v1.1 settings documentation to the markdown folder.

- Fixed a very minor bug in the step direction handling upon wakeup.
The direction mask would temporarily go back to default mask for about
a millisecond when moving in the same non-default direction. It did not
effect Grbl behavior before, but fixed for consistency.
This commit is contained in:
chamnit
2016-10-12 19:18:05 -06:00
parent 6ab3cfbe7d
commit a0e96eb11a
4 changed files with 169 additions and 129 deletions

View File

@ -202,8 +202,7 @@ void st_wake_up()
if (bit_istrue(settings.flags,BITFLAG_INVERT_ST_ENABLE)) { STEPPERS_DISABLE_PORT |= (1<<STEPPERS_DISABLE_BIT); }
else { STEPPERS_DISABLE_PORT &= ~(1<<STEPPERS_DISABLE_BIT); }
// Initialize stepper output bits
st.dir_outbits = dir_port_invert_mask;
// Initialize stepper output bits to ensure first ISR call does not step.
st.step_outbits = step_port_invert_mask;
// Initialize step pulse timing from settings. Here to ensure updating after re-writing.
@ -294,7 +293,6 @@ void st_go_idle()
// with probing and homing cycles that require true real-time positions.
ISR(TIMER1_COMPA_vect)
{
// SPINDLE_ENABLE_PORT ^= 1<<SPINDLE_ENABLE_BIT; // Debug: Used to time ISR
if (busy) { return; } // The busy-flag is used to avoid reentering this interrupt
// Set the direction pins a couple of nanoseconds before we step the steppers
@ -416,7 +414,6 @@ ISR(TIMER1_COMPA_vect)
st.step_outbits ^= step_port_invert_mask; // Apply step port invert mask
busy = false;
// SPINDLE_ENABLE_PORT ^= 1<<SPINDLE_ENABLE_BIT; // Debug: Used to time ISR
}
@ -480,6 +477,7 @@ void st_reset()
busy = false;
st_generate_step_dir_invert_masks();
st.dir_outbits = dir_port_invert_mask; // Initialize direction bits to default.
// Initialize step and direction port pins.
STEP_PORT = (STEP_PORT & ~STEP_MASK) | step_port_invert_mask;