Skip to content

Commit

Permalink
No variable spindle and spindle speed fix.
Browse files Browse the repository at this point in the history
- When VARIABLE_SPINDLE output is disabled in config.h, the last commit
would keep the spindle enable pin disabled when spindle speed is not
defined (S0). This is now ignored and will enable with S0, as spindle
speed is ignored in this mode.
  • Loading branch information
chamnit committed Mar 18, 2016
1 parent b00d2a1 commit 966abff
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Grbl includes full acceleration management with look ahead. That means the contr
***

_**Master Branch:**_
* [Grbl v0.9j Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1I8Ey4S) _(2016-03-16)_
* [Grbl v0.9j Atmega328p 16mhz 115200baud with generic defaults](http://bit.ly/1I8Ey4S) _(2016-03-17)_
- **IMPORTANT INFO WHEN UPGRADING TO GRBL v0.9 :**
- Baudrate is now **115200** (Up from 9600).
- Homing cycle updated. Located based on switch trigger, rather than release point.
Expand All @@ -48,6 +48,8 @@ _**Archives:**_

##Update Summary for v0.9j
- **Restore EEPROM feature:** A new set of restore EEPROM features to help OEMs and users reset their Grbl installation to the build defaults. See Configuring Grbl Wiki for details.
- **More configuration options for input pins**
- **Bug fixes including:** Soft limit error handling, disable spindle when S0, g-code reporting of G38.x.

##Update Summary for v0.9i
- **IMPORTANT:**
Expand Down
11 changes: 11 additions & 0 deletions doc/log/commit_log_v0.9j.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
----------------
Date: 2016-03-16
Author: Sonny Jeon
Subject: Soft limit handling bug fix

- Soft limit errors were stuck in a feed hold without notifying the
user why it was in a hold. When resumed, the soft limit error would
kick in. Issue should be fixed to behave as intended to automatically
hold and issue a soft limit alarm once the machine has come to a stop.


----------------
Date: 2016-03-03
Author: Sonny Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

// Grbl versioning system
#define GRBL_VERSION "0.9j"
#define GRBL_VERSION_BUILD "20160316"
#define GRBL_VERSION_BUILD "20160317"

// Define standard libraries used by Grbl.
#include <avr/io.h>
Expand Down
15 changes: 7 additions & 8 deletions grbl/spindle_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ void spindle_set_state(uint8_t state, float rpm)
}

#else
if (rpm <= 0.0) { spindle_stop(); } // RPM should never be negative, but check anyway.
else {
#ifdef INVERT_SPINDLE_ENABLE_PIN
SPINDLE_ENABLE_PORT &= ~(1<<SPINDLE_ENABLE_BIT);
#else
SPINDLE_ENABLE_PORT |= (1<<SPINDLE_ENABLE_BIT);
#endif
}
// NOTE: Without variable spindle, the enable bit should just turn on or off, regardless
// if the spindle speed value is zero, as its ignored anyhow.
#ifdef INVERT_SPINDLE_ENABLE_PIN
SPINDLE_ENABLE_PORT &= ~(1<<SPINDLE_ENABLE_BIT);
#else
SPINDLE_ENABLE_PORT |= (1<<SPINDLE_ENABLE_BIT);
#endif
#endif

}
Expand Down

0 comments on commit 966abff

Please sign in to comment.