File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed
Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 1+ ----------------
2+ Date: 2016-12-19
3+ Author: Sonny Jeon
4+ Subject: Fixed homing fail alarm handling. Re-integrated software debouncing.
5+
6+ - [bug] Fixed a homing fail issue, where the alarm was not being set
7+ right, not cleared correctly. It would report the wrong code and enter
8+ an infinite alarm loop. This was due to how alarm codes were altered a
9+ while back. Now updated and fixed to show the right codes.
10+
11+ - [feature] Re-installed optional software debouncing for hard limit
12+ switches. By request.
13+
14+
115----------------
216Date: 2016-12-18
317Author: Sonny Jeon
Original file line number Diff line number Diff line change 2323
2424// Grbl versioning system
2525#define GRBL_VERSION "1.1e"
26- #define GRBL_VERSION_BUILD "20161219 "
26+ #define GRBL_VERSION_BUILD "20170103 "
2727
2828// Define standard libraries used by Grbl.
2929#include <avr/io.h>
Original file line number Diff line number Diff line change @@ -115,19 +115,11 @@ void spindle_stop()
115115 // and stepper ISR. Keep routine small and efficient.
116116 void spindle_set_speed (uint8_t pwm_value )
117117 {
118+ SPINDLE_OCR_REGISTER = pwm_value ; // Set PWM output level.
118119 if (pwm_value == SPINDLE_PWM_OFF_VALUE ) {
119- spindle_stop ();
120+ SPINDLE_TCCRA_REGISTER &= ~( 1 << SPINDLE_COMB_BIT ); // Disable PWM. Output voltage is zero.
120121 } else {
121- SPINDLE_OCR_REGISTER = pwm_value ; // Set PWM output level.
122122 SPINDLE_TCCRA_REGISTER |= (1 <<SPINDLE_COMB_BIT ); // Ensure PWM output is enabled.
123-
124- #if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN )
125- #ifdef INVERT_SPINDLE_ENABLE_PIN
126- SPINDLE_ENABLE_PORT &= ~(1 <<SPINDLE_ENABLE_BIT );
127- #else
128- SPINDLE_ENABLE_PORT |= (1 <<SPINDLE_ENABLE_BIT );
129- #endif
130- #endif
131123 }
132124 }
133125
@@ -194,7 +186,8 @@ void spindle_stop()
194186 if (state == SPINDLE_ENABLE_CCW ) { rpm = 0.0 ; } // TODO: May need to be rpm_min*(100/MAX_SPINDLE_SPEED_OVERRIDE);
195187 }
196188 spindle_set_speed (spindle_compute_pwm_value (rpm ));
197- #else
189+ #endif
190+ #if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN ) || !defined(VARIABLE_SPINDLE )
198191 // NOTE: Without variable spindle, the enable bit should just turn on or off, regardless
199192 // if the spindle speed value is zero, as its ignored anyhow.
200193 #ifdef INVERT_SPINDLE_ENABLE_PIN
You can’t perform that action at this time.
0 commit comments