Skip to content

Commit

Permalink
Homing alarm upon no switch. Licensing update.
Browse files Browse the repository at this point in the history
- Homing cycle failure reports alarm feedback when the homing cycle is
exited via a reset, interrupted by a safety door switch, or does not
find the limit switch.

- Homing cycle bug fix when not finding the limit switch. It would just
idle before, but now will exit with an alarm.

- Licensing update. Corrected licensing according to lawyer
recommendations. Removed references to other Grbl versions.
  • Loading branch information
chamnit committed Feb 16, 2015
1 parent d36d351 commit 8c9fc79
Show file tree
Hide file tree
Showing 37 changed files with 116 additions and 262 deletions.
45 changes: 9 additions & 36 deletions COPYING
Original file line number Diff line number Diff line change
@@ -1,56 +1,31 @@
------------------------------------------------------------------------------
COPYRIGHT NOTICE FOR GRBL v0.9:
COPYRIGHT NOTICE FOR GRBL:
------------------------------------------------------------------------------

GRBL v0.9 - Embedded CNC g-code interpreter and motion-controller
Copyright (c) 2012-2014 Sungeun K. Jeon
Grbl - Embedded CNC g-code interpreter and motion-controller

This program is free software: you can redistribute it and/or modify
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011 Jens Geisler

Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

along with Grbl. If not, see <http://www.gnu.org/licenses/>.


------------------------------------------------------------------------------
COPYRIGHT NOTICE(S) FOR WORK CONTAINED IN THIS SOFTWARE:
------------------------------------------------------------------------------

The MIT License (MIT)

GRBL(tm) v0.8 - Embedded CNC g-code interpreter and motion-controller
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2013 Sungeun K. Jeon
Copyright (c) 2011 Jens Geisler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

-------------

Copyright (c) 2008, Atmel Corporation All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -704,5 +679,3 @@ Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

------------------------------------------------------------------------------
11 changes: 3 additions & 8 deletions grbl/config.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
config.h - compile time configuration
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2013-2015 Sungeun K. Jeon
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2013 Sungeun K. Jeon
*/

// This file contains compile-time configurations for Grbl's internal system. For the most part,
// users will not need to directly modify these, but they are here for specific needs, i.e.
Expand Down
2 changes: 1 addition & 1 deletion grbl/coolant_control.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
coolant_control.c - coolant control methods
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/coolant_control.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
coolant_control.h - spindle control methods
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/cpu_map.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
cpu_map.h - CPU and pin mapping configuration file
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Expand Down
2 changes: 1 addition & 1 deletion grbl/defaults.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
defaults.h - defaults settings configuration file
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Expand Down
28 changes: 10 additions & 18 deletions grbl/eeprom.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,20 @@
eeprom.h - EEPROM methods
Part of Grbl
The MIT License (MIT)
GRBL(tm) - Embedded CNC g-code interpreter and motion-controller
Copyright (c) 2009-2011 Simen Svale Skogsrud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef eeprom_h
Expand Down
13 changes: 4 additions & 9 deletions grbl/gcode.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
gcode.c - rs274/ngc parser.
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2012-2015 Sungeun K. Jeon
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
*/

#include "grbl.h"

Expand Down
11 changes: 3 additions & 8 deletions grbl/gcode.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
gcode.h - rs274/ngc parser.
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
*/

#ifndef gcode_h
#define gcode_h
Expand Down
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
grbl.h - main Grbl include file
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2015 Sungeun K. Jeon
Expand Down
16 changes: 6 additions & 10 deletions grbl/limits.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
limits.c - code pertaining to limit-switches and performing the homing cycle
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2012 Sungeun K. Jeon
*/

#include "grbl.h"

Expand Down Expand Up @@ -202,8 +197,9 @@ void limits_go_home(uint8_t cycle_mask)
st_prep_buffer(); // Check and prep segment buffer. NOTE: Should take no longer than 200us.
// Check only for user reset. No time to run protocol_execute_realtime() in this loop.

if (sys.rt_exec_state & (EXEC_SAFETY_DOOR | EXEC_RESET)) { // Abort homing and alarm upon safety door.
if (sys.rt_exec_state & EXEC_SAFETY_DOOR) { mc_reset(); }
// Exit routines: User abort homing and alarm upon safety door or no limit switch found.
if (sys.rt_exec_state & (EXEC_SAFETY_DOOR | EXEC_RESET | EXEC_CYCLE_STOP)) {
if (sys.rt_exec_state & (EXEC_SAFETY_DOOR | EXEC_CYCLE_STOP)) { mc_reset(); }
protocol_execute_realtime();
return;
}
Expand Down
10 changes: 3 additions & 7 deletions grbl/limits.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
limits.h - code pertaining to limit-switches and performing the homing cycle
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand All @@ -17,11 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
*/

#ifndef limits_h
#define limits_h
Expand Down
13 changes: 4 additions & 9 deletions grbl/main.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*
main.c - An embedded CNC Controller with rs274/ngc (g-code) support
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2012-2015 Sungeun K. Jeon
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
*/

#include "grbl.h"

Expand Down
16 changes: 6 additions & 10 deletions grbl/motion_control.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/*
motion_control.c - high level interface for issuing motion commands
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -17,13 +19,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
Copyright (c) 2011 Jens Geisler
*/

#include "grbl.h"

Expand Down Expand Up @@ -361,7 +356,8 @@ void mc_reset()
// the steppers enabled by avoiding the go_idle call altogether, unless the motion state is
// violated, by which, all bets are off.
if ((sys.state & (STATE_CYCLE | STATE_HOMING)) || (sys.suspend == SUSPEND_ENABLE_HOLD)) {
bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE);
if (sys.state == STATE_HOMING) { bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_HOMING_FAIL); }
else { bit_true_atomic(sys.rt_exec_alarm, EXEC_ALARM_ABORT_CYCLE); }
st_go_idle(); // Force kill steppers. Position has likely been lost.
}
}
Expand Down
11 changes: 3 additions & 8 deletions grbl/motion_control.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/*
motion_control.h - high level interface for issuing motion commands
Part of Grbl v0.9
Part of Grbl
Copyright (c) 2012-2015 Sungeun K. Jeon
Copyright (c) 2011-2015 Sungeun K. Jeon
Copyright (c) 2009-2011 Simen Svale Skogsrud
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -17,12 +18,6 @@
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
*/

#ifndef motion_control_h
#define motion_control_h
Expand Down
Loading

0 comments on commit 8c9fc79

Please sign in to comment.