Updated licensing and attributions
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Mon, 14 Mar 2016 02:24:19 +0000 (19:24 -0700)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Mon, 14 Mar 2016 02:24:19 +0000 (19:24 -0700)
66 files changed:
CODE_TAG [new file with mode: 0644]
LICENSE
Makefile
README.md
src/canonical_machine.c
src/canonical_machine.h
src/clock.c
src/clock.h
src/command.c
src/command.def
src/command.h
src/config.h
src/controller.c
src/controller.h
src/cpp_magic.h
src/cycle_homing.c
src/cycle_probing.c
src/encoder.c
src/encoder.h
src/gcode_parser.c
src/gcode_parser.h
src/gpio.c
src/gpio.h
src/hardware.c
src/hardware.h
src/main.c
src/messages.def
src/plan/arc.c
src/plan/arc.h
src/plan/buffer.c
src/plan/command.c
src/plan/dwell.c
src/plan/exec.c
src/plan/feedhold.c
src/plan/jog.c
src/plan/jog.h
src/plan/kinematics.c
src/plan/kinematics.h
src/plan/line.c
src/plan/planner.c
src/plan/planner.h
src/plan/zoid.c
src/pwm.c
src/pwm.h
src/report.c
src/report.h
src/ringbuf.def
src/rtc.c
src/rtc.h
src/spindle.c
src/spindle.h
src/status.c
src/status.h
src/stepper.c
src/stepper.h
src/switch.c
src/switch.h
src/tmc2660.c
src/tmc2660.h
src/usart.c
src/usart.h
src/util.c
src/util.h
src/vars.c
src/vars.def
src/vars.h

diff --git a/CODE_TAG b/CODE_TAG
new file mode 100644 (file)
index 0000000..6a26c85
--- /dev/null
+++ b/CODE_TAG
@@ -0,0 +1,22 @@
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016, Buildbotics LLC
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
diff --git a/LICENSE b/LICENSE
index d159169d1050894d3ea3b98e1c965c4058208fe1..b08b65785d76c07545bff1ffe110158a624aae86 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,44 @@
+The Buildbotics firmware ("the software") is free software: you can
+redistribute it and/or modify it under the terms of the GNU General
+Public License, version 2 (with out any licensing exceptions) as
+published by the Free Software Foundation.  See the full license terms
+below.
+
+***********************************************************************
+
+Substantial effort was made to give credit to all authors of this
+software and of the works it was derived from and to adhere to the
+terms of the applicable license agreements.  If you belive any
+mistakes have been made in this regard please contact Joseph Coffland
+<joseph@buildbotics.com>.
+
+Portions of this software are copyrighted by the following entities:
+
+  Copyright (c) 2015 - 2016 Buildbotics LLC
+  Copyright (c) 2014 Thomas Nixon, Jonathan Heathcote (cpp_magic.h)
+  Copyright (c) 2013 - 2015 Robert Giseburt
+  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+  Copyright (c) 2008 Atmel Corporation (part of clock.c)
+  All rights reserved.
+
+Each source code file lists the entities which claim copyright to
+parts of those files.
+
+Much of this software was originally written by Alden S. Hart, Jr. and
+Robert Giseburt as part of the TinyG project.  The TinyG project was
+in turn derived from grbl/marlin firmwares.  All of the original code
+has been reformatted and cleaned up to fit our coding standards.
+Functionality in many areas has been substantially modified.
+
+The original TinyG firmware is licensed under the GPL v2 and includes
+an exception which allows use of the source code by non-GPLed
+libraires and potentially executables linked to those libraries.  The
+TinyG project's license did not specify that this exception must be
+offered in derived works, therefore this software's license DOES NOT
+offer any exceptions to the GPL v2 license.
+
+***********************************************************************
+
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
 
index ce3c7f43c69362d8ce3f670e445cb14913d475d4..e396bf6c3bd1421a51a427f4c878f8b2ef0891f8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-# Makefile for the project TinyG firmware
-PROJECT = tinyg
+# Makefile for the project Bulidbotics firmware
+PROJECT = buildbotics
 MCU     = atxmega192a3u
 CLOCK   = 32000000
 
index 7b1e78ded2bbaa48abccb720c506d8e594b7d61b..5080db1b7c21e358c0c226e490a126105852684b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,11 +1,10 @@
-TinyG is a 6 axis motion control system designed for high-performance on small to mid-sized machines.  This fork contains a modified version of the TinyG firmware.  See the [original TinyG](https://github.com/synthetos/TinyG) for more info.
+The Buildbotics firmware is a 4 axis motion control system designed for
+high-performance on small to mid-sized machines.  It was originally
+derived from the [TinyG firmware](https://github.com/synthetos/TinyG).
 
 # Features
-* 6 axis motion (XYZABC axes)
+* 4 axis motion
 * jerk controlled motion for acceleration planning (3rd order motion planning)
-* status displays ('?' character)
-* XON/XOFF and RTS/CTS protocol over USB serial
-* RESTful interface using JSON
 
 # Build Instructions
 To build in Linux run:
@@ -21,8 +20,3 @@ Other make commands are:
  * **read_fuses** - Read and pring AVR fuse bytes
  * **clean** - Remove build files
  * **tidy** - Remove backup files
-
-# Links
-* [TinyG Wiki](https://github.com/synthetos/TinyG/wiki)
-* [TinyG Support Forum](https://www.synthetos.com/forum/tinyg/)
-* [TinyG Github](https://github.com/synthetos/TinyG)
index 9e69b94ecc952c042b61a60fa063d9d5930db0d5..757bad5f778ad27a24329f148fae4a26c9e5bab4 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * canonical_machine.c - rs274/ngc canonical machine.
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S Hart, Jr.
- * Copyright (c) 2014 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* This code is a loose implementation of Kramer, Proctor and Messina's
  * canonical machining functions as described in the NIST RS274/NGC v3
@@ -225,7 +220,7 @@ uint8_t cm_get_spindle_mode(GCodeState_t *gcode_state) {
 uint8_t cm_get_block_delete_switch() {return cm.gmx.block_delete_switch;}
 uint8_t cm_get_runtime_busy() {return mp_get_runtime_busy();}
 
-                               
+
 float cm_get_feed_rate(GCodeState_t *gcode_state) {
   return gcode_state->feed_rate;
 }
@@ -282,7 +277,7 @@ void cm_set_model_linenum(uint32_t linenum) {
  *    - coordinate system selected. 1-9 correspond to G54-G59
  *    - absolute override: forces current move to be interpreted in machine
  *      coordinates: G53 (system 0)
- *    - G92 offsets are added "on top of" the coord system offsets -- 
+ *    - G92 offsets are added "on top of" the coord system offsets --
  *      if origin_offset_enable
  *    - G28 and G30 moves; these are run in absolute coordinates
  *
@@ -290,7 +285,7 @@ void cm_set_model_linenum(uint32_t linenum) {
  * supposed to be persistent.
  *
  * To reduce complexity and data load the following is done:
- *    - Full data for coordinates/offsets is only accessible by the canonical 
+ *    - Full data for coordinates/offsets is only accessible by the canonical
  *      machine, not the downstream
  *    - Resolved set of coord and G92 offsets, with per-move exceptions can
  *      be captured as "work_offsets"
@@ -522,7 +517,7 @@ stat_t cm_test_soft_limits(float target[]) {
 void canonical_machine_init() {
   // If you can assume all memory has been zeroed by a hard reset you don't
   // need this code:
-  memset(&cm.gm, 0, sizeof(GCodeState_t));      
+  memset(&cm.gm, 0, sizeof(GCodeState_t));
   memset(&cm.gn, 0, sizeof(GCodeInput_t));
   memset(&cm.gf, 0, sizeof(GCodeInput_t));
 
@@ -781,7 +776,7 @@ stat_t cm_set_coord_system(uint8_t coord_system) {
 
 static void _exec_offset(float *value, float *flag) {
   // coordinate system is passed in value[0] element
-  uint8_t coord_system = ((uint8_t)value[0]); 
+  uint8_t coord_system = ((uint8_t)value[0]);
   float offsets[AXES];
   for (uint8_t axis = AXIS_X; axis < AXES; axis++)
     offsets[axis] = cm.offset[coord_system][axis] +
@@ -949,9 +944,9 @@ stat_t cm_set_g28_position() {
 stat_t cm_goto_g28_position(float target[], float flags[]) {
   cm_set_absolute_override(MODEL, true);
   // move through intermediate point, or skip
-  cm_straight_traverse(target, flags);            
+  cm_straight_traverse(target, flags);
 
-  // make sure you have an available buffer     
+  // make sure you have an available buffer
   while (!mp_get_planner_buffers_available());
 
   // execute actual stored move
@@ -971,7 +966,7 @@ stat_t cm_set_g30_position() {
 stat_t cm_goto_g30_position(float target[], float flags[]) {
   cm_set_absolute_override(MODEL, true);
   // move through intermediate point, or skip
-  cm_straight_traverse(target, flags); 
+  cm_straight_traverse(target, flags);
   // make sure you have an available buffer
   while (!mp_get_planner_buffers_available());
   float f[] = {1, 1, 1, 1, 1, 1};
@@ -1133,7 +1128,7 @@ stat_t cm_override_enables(uint8_t flag) {
 
 
 /// M50
-stat_t cm_feed_rate_override_enable(uint8_t flag) {   
+stat_t cm_feed_rate_override_enable(uint8_t flag) {
   if (fp_TRUE(cm.gf.parameter) && fp_ZERO(cm.gn.parameter))
     cm.gmx.feed_rate_override_enable = false;
   else cm.gmx.feed_rate_override_enable = true;
@@ -1143,7 +1138,7 @@ stat_t cm_feed_rate_override_enable(uint8_t flag) {
 
 
 /// M50.1
-stat_t cm_feed_rate_override_factor(uint8_t flag) {    
+stat_t cm_feed_rate_override_factor(uint8_t flag) {
   cm.gmx.feed_rate_override_enable = flag;
   cm.gmx.feed_rate_override_factor = cm.gn.parameter;
   return STAT_OK;
@@ -1151,7 +1146,7 @@ stat_t cm_feed_rate_override_factor(uint8_t flag) {
 
 
 /// M50.2
-stat_t cm_traverse_override_enable(uint8_t flag) {     
+stat_t cm_traverse_override_enable(uint8_t flag) {
   if (fp_TRUE(cm.gf.parameter) && fp_ZERO(cm.gn.parameter))
     cm.gmx.traverse_override_enable = false;
   else cm.gmx.traverse_override_enable = true;
@@ -1161,7 +1156,7 @@ stat_t cm_traverse_override_enable(uint8_t flag) {
 
 
 /// M51
-stat_t cm_traverse_override_factor(uint8_t flag) {     
+stat_t cm_traverse_override_factor(uint8_t flag) {
   cm.gmx.traverse_override_enable = flag;
   cm.gmx.traverse_override_factor = cm.gn.parameter;
   return STAT_OK;
@@ -1169,7 +1164,7 @@ stat_t cm_traverse_override_factor(uint8_t flag) {
 
 
 /// M51.1
-stat_t cm_spindle_override_enable(uint8_t flag) {       
+stat_t cm_spindle_override_enable(uint8_t flag) {
   if (fp_TRUE(cm.gf.parameter) && fp_ZERO(cm.gn.parameter))
     cm.gmx.spindle_override_enable = false;
   else cm.gmx.spindle_override_enable = true;
@@ -1179,7 +1174,7 @@ stat_t cm_spindle_override_enable(uint8_t flag) {
 
 
 /// M50.1
-stat_t cm_spindle_override_factor(uint8_t flag) {       
+stat_t cm_spindle_override_factor(uint8_t flag) {
   cm.gmx.spindle_override_enable = flag;
   cm.gmx.spindle_override_factor = cm.gn.parameter;
 
@@ -1296,7 +1291,7 @@ stat_t cm_queue_flush() {
  *
  * cm_program_end() implements M2 and M30
  * The END behaviors are defined by NIST 3.6.1 are:
- *    1. Axis offsets are set to zero (like G92.2) and origin offsets are set 
+ *    1. Axis offsets are set to zero (like G92.2) and origin offsets are set
  *       to the default (like G54)
  *    2. Selected plane is set to CANON_PLANE_XY (like G17)
  *    3. Distance mode is set to MODE_ABSOLUTE (like G90)
@@ -1308,7 +1303,7 @@ stat_t cm_queue_flush() {
  *    9. Coolant is turned off (like M9)
  *
  * cm_program_end() implments things slightly differently:
- *    1. Axis offsets are set to G92.1 CANCEL offsets 
+ *    1. Axis offsets are set to G92.1 CANCEL offsets
  *       (instead of using G92.2 SUSPEND Offsets)
  *       Set default coordinate system (uses $gco, not G54)
  *    2. Selected plane is set to default plane ($gpl)
index f3422c37d55dd7c1a2ce404cd84f39966fcb196f..0a5c8126de92456ee943b4d92fb72e94f737db49 100644 (file)
@@ -1,38 +1,30 @@
-/*
- * canonical_machine.h - rs274/ngc canonical machining functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart Jr.
- *
- * This code is a loose implementation of Kramer, Proctor and Messina's
- * canonical machining functions as described in the NIST RS274/NGC v3
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -43,9 +35,9 @@
 #include <stdint.h>
 
 /// absolute pointer from canonical machine gm model
-#define MODEL   (GCodeState_t *)&cm.gm        
+#define MODEL   (GCodeState_t *)&cm.gm
 /// relative to buffer *bf is currently pointing to
-#define PLANNER (GCodeState_t *)&bf->gm       
+#define PLANNER (GCodeState_t *)&bf->gm
 /// absolute pointer from runtime mm struct
 #define RUNTIME (GCodeState_t *)&mr.gm
 /// active model pointer is maintained by state management
@@ -479,7 +471,7 @@ enum cmCoordSystem {
 /// G Modal Group 13
 enum cmPathControlMode {
   /// G61 - hits corners but does not stop if it does not need to.
-  PATH_EXACT_PATH,    
+  PATH_EXACT_PATH,
   PATH_EXACT_STOP,                // G61.1 - stops at all corners
   PATH_CONTINUOUS                 // G64 and typically the default mode
 };
@@ -507,14 +499,14 @@ enum cmOriginOffset {
 
 
 enum cmProgramFlow {
-  PROGRAM_STOP,    
+  PROGRAM_STOP,
   PROGRAM_END
 };
 
 
 /// spindle state settings (See hardware.h for bit settings)
 enum cmSpindleState {
-  SPINDLE_OFF,    
+  SPINDLE_OFF,
   SPINDLE_CW,
   SPINDLE_CCW
 };
@@ -531,7 +523,7 @@ enum cmCoolantState {
 
 /// used for spindle and arc dir
 enum cmDirection {
-  DIRECTION_CW,    
+  DIRECTION_CW,
   DIRECTION_CCW
 };
 
@@ -650,87 +642,87 @@ stat_t cm_soft_alarm(stat_t status);
 stat_t cm_clear();
 
 // Representation (4.3.3)
-stat_t cm_select_plane(uint8_t plane);                          
-stat_t cm_set_units_mode(uint8_t mode);                         
-stat_t cm_set_distance_mode(uint8_t mode);                      
+stat_t cm_select_plane(uint8_t plane);
+stat_t cm_set_units_mode(uint8_t mode);
+stat_t cm_set_distance_mode(uint8_t mode);
 stat_t cm_set_coord_offsets(uint8_t coord_system, float offset[], float flag[]);
 
-void cm_set_position(uint8_t axis, float position);             
-stat_t cm_set_absolute_origin(float origin[], float flag[]);    
-void cm_set_axis_origin(uint8_t axis, const float position);    
+void cm_set_position(uint8_t axis, float position);
+stat_t cm_set_absolute_origin(float origin[], float flag[]);
+void cm_set_axis_origin(uint8_t axis, const float position);
 
-stat_t cm_set_coord_system(uint8_t coord_system);               
-stat_t cm_set_origin_offsets(float offset[], float flag[]);     
-stat_t cm_reset_origin_offsets();                               
-stat_t cm_suspend_origin_offsets();                             
-stat_t cm_resume_origin_offsets();                              
+stat_t cm_set_coord_system(uint8_t coord_system);
+stat_t cm_set_origin_offsets(float offset[], float flag[]);
+stat_t cm_reset_origin_offsets();
+stat_t cm_suspend_origin_offsets();
+stat_t cm_resume_origin_offsets();
 
 // Free Space Motion (4.3.4)
-stat_t cm_straight_traverse(float target[], float flags[]);     
-stat_t cm_set_g28_position();                                   
-stat_t cm_goto_g28_position(float target[], float flags[]);     
-stat_t cm_set_g30_position();                                   
-stat_t cm_goto_g30_position(float target[], float flags[]);     
+stat_t cm_straight_traverse(float target[], float flags[]);
+stat_t cm_set_g28_position();
+stat_t cm_goto_g28_position(float target[], float flags[]);
+stat_t cm_set_g30_position();
+stat_t cm_goto_g30_position(float target[], float flags[]);
 
 // Machining Attributes (4.3.5)
-stat_t cm_set_feed_rate(float feed_rate);                        
-stat_t cm_set_feed_rate_mode(uint8_t mode);                      
-stat_t cm_set_path_control(uint8_t mode);                        
+stat_t cm_set_feed_rate(float feed_rate);
+stat_t cm_set_feed_rate_mode(uint8_t mode);
+stat_t cm_set_path_control(uint8_t mode);
 
 // Machining Functions (4.3.6)
-stat_t cm_straight_feed(float target[], float flags[]);          
-stat_t cm_arc_feed(float target[], float flags[],                
+stat_t cm_straight_feed(float target[], float flags[]);
+stat_t cm_arc_feed(float target[], float flags[],
                    float i, float j, float k,
                    float radius, uint8_t motion_mode);
-stat_t cm_dwell(float seconds);                                  
+stat_t cm_dwell(float seconds);
 
 // Spindle Functions (4.3.7)
 // see spindle.h for spindle definitions - which would go right here
 
 // Tool Functions (4.3.8)
-stat_t cm_select_tool(uint8_t tool);                             
-stat_t cm_change_tool(uint8_t tool);                             
+stat_t cm_select_tool(uint8_t tool);
+stat_t cm_change_tool(uint8_t tool);
 
 // Miscellaneous Functions (4.3.9)
-stat_t cm_mist_coolant_control(uint8_t mist_coolant);            
-stat_t cm_flood_coolant_control(uint8_t flood_coolant);          
+stat_t cm_mist_coolant_control(uint8_t mist_coolant);
+stat_t cm_flood_coolant_control(uint8_t flood_coolant);
 
-stat_t cm_override_enables(uint8_t flag);                        
-stat_t cm_feed_rate_override_enable(uint8_t flag);               
-stat_t cm_feed_rate_override_factor(uint8_t flag);               
-stat_t cm_traverse_override_enable(uint8_t flag);                
-stat_t cm_traverse_override_factor(uint8_t flag);                
-stat_t cm_spindle_override_enable(uint8_t flag);                 
-stat_t cm_spindle_override_factor(uint8_t flag);                 
+stat_t cm_override_enables(uint8_t flag);
+stat_t cm_feed_rate_override_enable(uint8_t flag);
+stat_t cm_feed_rate_override_factor(uint8_t flag);
+stat_t cm_traverse_override_enable(uint8_t flag);
+stat_t cm_traverse_override_factor(uint8_t flag);
+stat_t cm_spindle_override_enable(uint8_t flag);
+stat_t cm_spindle_override_factor(uint8_t flag);
 
-void cm_message(char *message);                                
+void cm_message(char *message);
 
 // Program Functions (4.3.10)
 void cm_request_feedhold();
 void cm_request_queue_flush();
 void cm_request_cycle_start();
 
-stat_t cm_feedhold_sequencing_callback();                   
-stat_t cm_queue_flush();                                    
+stat_t cm_feedhold_sequencing_callback();
+stat_t cm_queue_flush();
 
-void cm_cycle_start();                                           
-void cm_cycle_end();                                             
-void cm_feedhold();                                              
-void cm_program_stop();                                          
-void cm_optional_program_stop();                                 
-void cm_program_end();                                           
+void cm_cycle_start();
+void cm_cycle_end();
+void cm_feedhold();
+void cm_program_stop();
+void cm_optional_program_stop();
+void cm_program_end();
 
 char cm_get_axis_char(const int8_t axis);
 
 // Cycles
 
 // Homing cycles
-stat_t cm_homing_cycle_start();                                  
-stat_t cm_homing_cycle_start_no_set();                           
-stat_t cm_homing_callback();                                     
+stat_t cm_homing_cycle_start();
+stat_t cm_homing_cycle_start_no_set();
+stat_t cm_homing_callback();
 
 // Probe cycles
-stat_t cm_straight_probe(float target[], float flags[]);         
-stat_t cm_probe_callback();                                      
+stat_t cm_straight_probe(float target[], float flags[]);
+stat_t cm_probe_callback();
 
 
index 3ae285249a2b06d18f3bc85396b6e20bf01201ee..006fde6f2a49f919a6132b4204c14e018f43ad81 100644 (file)
@@ -1,24 +1,30 @@
-/*
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2013 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "clock.h"
 
@@ -68,7 +74,7 @@ void clock_init()  {
 }
 
 /******************************************************************************
- * The following code was excerpted from the Atmel AVR1003 clock driver example 
+ * The following code was excerpted from the Atmel AVR1003 clock driver example
  * and carries its copyright:
  *
  * $Revision: 2771 $
@@ -163,4 +169,3 @@ asm volatile(
 AVR_LEAVE_CRITICAL_REGION();
 #endif
 }
-
index 818bd26c15cda55fbec5e73dd4f910ab6007ec0d..02fd34d2f377a5690aad741ebfc7f5e0ffc8673e 100644 (file)
@@ -1,24 +1,30 @@
-/*
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2013 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -27,5 +33,3 @@
 
 void clock_init();
 void CCPWrite(volatile uint8_t *address, uint8_t value);
-
-
index 0742043548ea62470cf329a09d0b632c58785906..1fd22ca429b9dcf14e54a19d6701133e8fa6201b 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index cdf9677d14a1ccbc9b9605dfbbea62bcc2c7029f..fc5e06d241de75358aa5721280d0eea1578ff7af 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index 37594c322eaf0221ad5f0ba2a5d70cd3913a97dc..e23c7f3f4709a7b51b9971d8e0a56d07d5b5f85c 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index f712ab837fb2818fd0018b40c2ef9045de17d7a4..b9ca7c0814de498bd44872eaac0bef11b95efd7b 100644 (file)
@@ -1,3 +1,30 @@
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
 #pragma once
 
 #include <avr/interrupt.h>
@@ -28,7 +55,6 @@
 #define M1_MICROSTEPS            MOTOR_MICROSTEPS
 #define M1_POLARITY              MOTOR_POLARITY_NORMAL
 #define M1_POWER_MODE            MOTOR_POWER_MODE
-#define M1_POWER_LEVEL           MOTOR_POWER_LEVEL
 
 #define M2_MOTOR_MAP             AXIS_Y
 #define M2_STEP_ANGLE            1.8
@@ -36,7 +62,6 @@
 #define M2_MICROSTEPS            MOTOR_MICROSTEPS
 #define M2_POLARITY              MOTOR_POLARITY_NORMAL
 #define M2_POWER_MODE            MOTOR_POWER_MODE
-#define M2_POWER_LEVEL           MOTOR_POWER_LEVEL
 
 #define M3_MOTOR_MAP             AXIS_A
 #define M3_STEP_ANGLE            1.8
@@ -44,7 +69,6 @@
 #define M3_MICROSTEPS            MOTOR_MICROSTEPS
 #define M3_POLARITY              MOTOR_POLARITY_NORMAL
 #define M3_POWER_MODE            MOTOR_POWER_MODE
-#define M3_POWER_LEVEL           MOTOR_POWER_LEVEL
 
 #define M4_MOTOR_MAP             AXIS_Z
 #define M4_STEP_ANGLE            1.8
@@ -52,7 +76,6 @@
 #define M4_MICROSTEPS            MOTOR_MICROSTEPS
 #define M4_POLARITY              MOTOR_POLARITY_NORMAL
 #define M4_POWER_MODE            MOTOR_POWER_MODE
-#define M4_POWER_LEVEL           MOTOR_POWER_LEVEL
 
 
 // Switch settings.  See switch.h
 #define C_SWITCH_MODE_MAX        SW_MODE_DISABLED
 
 
-// Jog settings
-#define JOG_ACCELERATION          50000  // mm/min^2
-
-
 // Machine settings
 #define CHORDAL_TOLERANCE         0.01   // chordal accuracy for arc drawing
 #define SOFT_LIMIT_ENABLE         0      // 0 = off, 1 = on
-#define JERK_MAX                  40     // yes, that's "20,000,000" mm/min^3
+#define JERK_MAX                  40     // yes, that's km/min^3
 #define JUNCTION_DEVIATION        0.05   // default value, in mm
 #define JUNCTION_ACCELERATION     100000 // centripetal corner acceleration
-
+#define JOG_ACCELERATION          500000  // mm/min^2
 
 // Axis settings
 #define VELOCITY_MAX             16000
index 332dc3c2103303c73861ecd62c4098bfb3c1eff1..514827a7402100c01099d6787e1a07742660babc 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * controller.c - tinyg controller and top level parser
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "controller.h"
 
index 0c8bfa92044d8ecce792cdce70f983090e414413..316f880f5f8b809b2ef254e28c3c4cb042ad9981 100644 (file)
@@ -1,36 +1,32 @@
-/*
- * controller.h - tinyg controller and main dispatch loop
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2014 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2014 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
 #pragma once
 
 
@@ -52,5 +48,3 @@ extern controller_t cs;                 // controller state structure
 
 void controller_init();
 void controller_run();
-
-
index 8402486bc08f2098a24261257b71f206590d3d7c..c7abc59eea5523f4e3ccd023b157c7b618226798 100644 (file)
@@ -1,5 +1,33 @@
-/**
- * This header file contains a library of advanced C Pre-Processor (CPP) macros
+/******************************************************************************\
+
+                     This file is part of the uSHET library.
+                        See https://github.com/18sg/uSHET
+
+              Copyright (c) 2014 Thomas Nixon, Jonathan Heathcote
+                            All rights reserved.
+
+    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.
+
+\******************************************************************************/
+
+/* This header file contains a library of advanced C Pre-Processor (CPP) macros
  * which implement various useful functions, such as iteration, in the
  * pre-processor.
  *
 #define EVAL1(...) __VA_ARGS__
 
 
-/**
- * Macros which expand to common values
- */
+// Macros which expand to common values
 #define PASS(...) __VA_ARGS__
 #define EMPTY()
 #define COMMA() ,
index 18c403b15110964d7f992115678dfdbd78df9d59..9adca0f435b913aac31cef2a6c35c6e2b019bf37 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * cycle_homing.c - homing cycle extension to canonical_machine
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "canonical_machine.h"
 #include "switch.h"
@@ -106,7 +101,9 @@ static int8_t _get_next_axis(int8_t axis);
 // G28.2 homing cycle
 
 /* Homing works from a G28.2 according to the following writeup:
- * https://github.com/synthetos/TinyG/wiki/TinyG-Homing-(version-0.95-and-above)
+ *
+ *   https://github.com/synthetos
+ *     /TinyG/wiki/Homing-and-Limits-Description-and-Operation
  *
  * How does this work?
  *
index 3544c49631011fa9f3242863e80635e54967bb5c..618a1de0a3dd579e49aa0bead3d580cdd0167f82 100644 (file)
@@ -1,34 +1,30 @@
-/* cycle_probing.c - probing cycle extension to canonical_machine.c
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "canonical_machine.h"
 #include "spindle.h"
index eca8b59eda9b58593f5c64fa597203aa0d097b32..8ba3fb3b52ec8a088c5f52a33eae63e59afe1087 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * encoder.c - encoder interface
- * This file is part of the TinyG project
- *
- * Copyright (c) 2013 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2013 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "encoder.h"
 
index 5be1bc543ba6264138cd255e03604f643d9baf7a..0490ef4e045b82cb91d56f1aee61792acb33bf02 100644 (file)
@@ -1,38 +1,32 @@
-/*
- * encoder.h - encoder interface
- * This file is part of TinyG project
- *
- * Copyright (c) 2013 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
 
-/*
- * Encoders
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
+/* Encoders
  *
  * Calling this file "encoders" is kind of a lie, at least for
  * now. There are no encoders.  Instead the steppers count steps to
@@ -71,9 +65,8 @@
  * somewhere. Targets are propagated downward to the planner runtime
  * (the EXEC), but the exec will have moved on to moveB by the time we
  * need it. So moveA's target needs to be saved somewhere.
- */
-
-/* Error correction
+ *
+ * Error correction
  *
  * The purpose of this module is to calculate an error term between
  * the programmed position (target) and the actual measured position
@@ -82,8 +75,8 @@
  * errors. It's also the basis of closed-loop (servoed) systems.
  *
  * Positional error occurs due to floating point numerical
- * inaccuracies. TinyG uses 32 bit floating point (GCC 32 bit, which
- * is NOT IEEE 32 bit). Errors creep in during planning, move
+ * inaccuracies.  This code uses 32 bit floating point (GCC 32 bit,
+ * which is NOT IEEE 32 bit). Errors creep in during planning, move
  * execution, and stepper output phases. Care has been taken to
  * minimize introducing errors throughout the process, but they still
  * occur.  In most cases errors are not noticeable as they fall below
@@ -132,5 +125,3 @@ extern enEncoder_t en[MOTORS];
 void encoder_init();
 void en_set_encoder_steps(uint8_t motor, float steps);
 float en_read_encoder(uint8_t motor);
-
-
index ec69215e72fa494ef13d3b895a77ba5f1edfc6b5..40c9eee3a782c61ffa6b7f5f6483cd240c581da5 100644 (file)
@@ -1,25 +1,30 @@
-/*
- * gcode_parser.c - rs274/ngc Gcode parser
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "gcode_parser.h"
 
index ab647da87d7e2a8bf29e6df5a4122d2c89432b1a..2a7184d43e20a313085bf419b40d88f6170fbd51 100644 (file)
@@ -1,25 +1,30 @@
-/*
- * gcode_parser.h - rs274/ngc Gcode parser
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -27,5 +32,3 @@
 #include "status.h"
 
 stat_t gc_gcode_parser(char *block);
-
-
index 06a1c83374515094facf1a8bc5057357601fc3f3..4fd46b1d8f056b66831ca2acf02af8255954fbfa 100644 (file)
@@ -1,38 +1,32 @@
-/*
- * gpio.c - general purpose IO bits
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
-/*
- * This GPIO file is where all parallel port bits are managed that are
+/* This GPIO file is where all parallel port bits are managed that are
  * not already taken up by steppers, serial ports, SPI or PDI programming
  *
  * There are 2 GPIO ports:
index 221e8fa0e4dbee1f6981ec935361b1ca47013200..5f48d5b9aef0a6a8464f44574cc77a57d31ac371 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * gpio.c - general purpose IO bits - including limit switches, inputs, outputs
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2014 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -50,5 +45,3 @@ uint8_t gpio_read_bit(uint8_t b);
 void gpio_set_bit_on(uint8_t b);
 void gpio_set_bit_off(uint8_t b);
 void gpio_set_bit_toggle(uint8_t b);
-
-
index fd1ea1564dee3d61b870fe89489e5fe7643a4a15..1a8f8d174bac72ff5517d6e166f38f9bdc79cdae 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * hardware.c - general hardware support functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "hardware.h"
 #include "switch.h"
index 52510160fe717e66e05e1c6111a1dc9473d46909..4e40e4a61393af7103de597518ec96a8c6e76448 100644 (file)
@@ -1,38 +1,31 @@
-/*
- * hardware.h - system hardware configuration
- * This file is hardware platform specific - AVR Xmega version
- *
- * This file is part of the TinyG project
- *
- * Copyright (c) 2013 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
index 782da0d28317991fdf5d8d8304109355562a3102..8ef03ee1e48da274a3fe487dd1043d49c6c9a36c 100644 (file)
@@ -1,26 +1,31 @@
-/*
- * main.c - TinyG - An embedded rs274/ngc CNC controller
- * This file is part of the TinyG project.
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2013 - 2015 Robert Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "hardware.h"
 #include "controller.h"
@@ -70,7 +75,7 @@ static void init() {
 
   sei(); // enable global interrupts
 
-  fprintf_P(stderr, PSTR("TinyG firmware\n"));
+  fprintf_P(stderr, PSTR("Buildbotics firmware\n"));
 }
 
 
index db6a9fabcb53abc739f42af93af474762f5ff9a9..fcb5585f8ef0ed004e7383e8dec3ff10452f0fd0 100644 (file)
@@ -1,3 +1,30 @@
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
 // Must keep these aligned with defs in status.h
 
 MSG(00, "OK")
@@ -217,7 +244,7 @@ MSG(197, "197")
 MSG(198, "198")
 MSG(199, "199")
 
-MSG(200, "Generic TinyG error")
+MSG(200, "Generic firmware error")
 MSG(201, "Move less than minimum length")
 MSG(202, "Move less than minimum time")
 MSG(203, "Machine is alarmed - Command not processed")
index 2200373a5eeda6d8e70f21c759b9cc2c4cca165b..e6a4d43e38ee939d069982120b8984e7c57dd977 100644 (file)
@@ -1,25 +1,30 @@
-/*
- * arc.c - arc planning and motion execution
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* This module actually contains some parts that belong ion the
  * canonical machine, and other parts that belong at the motion planner
index 79658d2ad2ba4a6d21dbe92fbc2fcd1112a594ab..8d294264f9adf4b0fec8371594026e745cb8eb0c 100644 (file)
@@ -1,25 +1,30 @@
-/*
- * arc.h - arc planning and motion execution
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -72,5 +77,3 @@ extern arc_t arc;
 void cm_arc_init();
 stat_t cm_arc_callback();
 void cm_abort_arc();
-
-
index ee6a02aa21b50bb885436aaae7291f0e29dbef60..4dfb4b5c12e3a0c516c3a3d6eaa845d8a80052b3 100644 (file)
@@ -1,35 +1,31 @@
-/*
- * buffer.c - Planner buffers
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* Planner buffers are used to queue and operate on Gcode blocks. Each
  * buffer contains one Gcode block which may be a move, and M code, or
index 1815a3b808b1899eee0eae8847da4dc6a6564bea..3cee84690095a5d277f5d52b8b203cac5fa7bc45 100644 (file)
@@ -1,35 +1,31 @@
-/*
- * command.c
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* How this works:
  *   - The command is called by the Gcode interpreter (cm_<command>, e.g. an M
index 855848f142be66db18c68eda83b390fbf0dde617..df28f678852d5c32a75e9a4938239a5a93e7a494 100644 (file)
@@ -1,35 +1,31 @@
-/*
- * dwell.c
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "planner.h"
 #include "canonical_machine.h"
index e2342170ffe1d7d45276b43c6b5b01dc6ec62faa..df943901540af26cdd3d068d12a012e644006e65 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * exec.c - execution function for acceleration managed lines
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "planner.h"
 #include "kinematics.h"
index 2af8cf4df7678f3cdb55d07dd3e8d536077dd76d..d95d8d6c3ea54f014567ae9830571ac9c889f1c8 100644 (file)
@@ -1,35 +1,31 @@
-/*
- * feedhold.c - functions for performing holds
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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 ACTIN OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                           All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "planner.h"
 #include "stepper.h"
index f3658a12f94177bb2dc9d4d3e3d6ac74b5cfe315..91d6b7c8b83e37a8b89157b93cfeaebed4d4ad76 100644 (file)
@@ -1,3 +1,30 @@
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
 #include "jog.h"
 #include "planner.h"
 #include "stepper.h"
index 784f5373c327aacc6893e496aa1802b736a4c93c..f71cee9aa333c94d3539861c4ff6e7f4e820ceef 100644 (file)
@@ -1,3 +1,30 @@
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
 #pragma once
 
 #include "config.h"
index ff7c3755295699e2ae39a547e67247c2fe9df796..040a7d482772d9fcf30fbb0dfa3433be31a9a90a 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * kinematics.c - inverse kinematics routines
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "kinematics.h"
 
@@ -66,4 +61,3 @@ void ik_kinematics(const float travel[], float steps[]) {
     else steps[motor] = travel[axis] * st_cfg.mot[motor].steps_per_unit;
   }
 }
-
index 69e17d25e0f3eaa1fd95d7043442da355a8cabe7..0c0df0fc3d35d65c1b7edb8b865a88877d4631db 100644 (file)
@@ -1,39 +1,32 @@
-/*
- * kinematics.h - inverse kinematics routines
- * This file is part of the TinyG project
- *
- * Copyright (c) 2013 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
 
-#pragma once
+                This file is part of the Buildbotics firmware.
 
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
 
-void ik_kinematics(const float travel[], float steps[]);
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
+\******************************************************************************/
 
+#pragma once
+
+
+void ik_kinematics(const float travel[], float steps[]);
index 499565610177229f8569e9e55afd87c4df36e93b..9b77bd3706b2f62a1fb7b241b7a9c91eb9bef464 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * line.c - acceleration managed line planning and motion execution
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "planner.h"
 
@@ -70,7 +65,7 @@
  * turn. The wider it is, the faster through the corner it can go.
  *
  * (Note 1: "max_jerk" refers to the old grbl/marlin max_jerk"
- * approximation term, not the tinyG jerk terms)
+ * approximation term, not the TinyG jerk terms)
  *
  * If you do the geometry in terms of the known variables, you get:
  *     sin(theta/2) = R/(R+delta)
index 4cf39a0b7538b138c2865a074daa8ba4c8fdeb20..8423833390a2f2ab0b29bf9b78814860da52c037 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * planner.c - Cartesian trajectory planning and motion execution
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* Planner Notes
  *
index 0099717d99a14111c57c805c2d45c6e49a60a3b8..8451f70a2897e9fb72d2a54460d09e0c0dc45c7e 100644 (file)
@@ -1,36 +1,31 @@
-/*
- * planner.h - cartesian trajectory planning and motion execution
- * This file is part of the TinyG project
- *
- * Copyright (c) 2013 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2013 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2013 - 2015 Robert Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
index a50099fae9b2f9c5c378cf55801e5bfb1d9d5ddf..99ff14225595ffc1c0d3e62b00333d6ced3770c9 100644 (file)
@@ -1,37 +1,31 @@
-/*
- * zoid.c - acceleration managed line planning and motion execution -
- * trapezoid planner.
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2012 - 2015 Rob Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "planner.h"
 #include "util.h"
@@ -433,11 +427,11 @@ float mp_get_target_length(const float Vi, const float Vf, const mpBuf_t *bf) {
  *
  * Or
  *   J from L, Vi, and Vf
- *   J = ((Vf - Vi) (Vi + Vf)²) / L²
+ *   J = ((Vf - Vi) (Vi + Vf)^2) / L^2
  *
  * Replacing Vf with x, and subtracting the known J:
- *   0 = ((x - Vi) (Vi + x)²) / L² - J
- *   Z(x) = ((x - Vi) (Vi + x)²) / L² - J
+ *   0 = ((x - Vi) (Vi + x)^2) / L^2 - J
+ *   Z(x) = ((x - Vi) (Vi + x)^2) / L^2 - J
  *
  * L doesn't resolve to the value very quickly (it graphs near-vertical).
  * So, we'll use J, which resolves in < 10 iterations, often in only two or
@@ -451,7 +445,7 @@ float mp_get_target_length(const float Vi, const float Vf, const mpBuf_t *bf) {
  *   SqrtDeltaOverJ = sqrt((x - Vi) / J)
  *   L'(x) = SqrtDeltaOverJ + (Vi + x) / (2*J) + (Vi + x) / (2 * SqrtDeltaJ)
  *
- *   J'(x) = (2 * Vi * x - Vi² + 3 * x²) / L²
+ *   J'(x) = (2 * Vi * x - Vi^2 + 3 * x^2) / L^2
  */
 
 #define GET_VELOCITY_ITERATIONS 0 // must be 0, 1, or 2
index 3a70e536087e79a7443609b8041198cbb3345a52..58ca1118355c3f4509df386f1ea891bc3e8b4124 100644 (file)
--- a/src/pwm.c
+++ b/src/pwm.c
@@ -1,35 +1,30 @@
-/*
- * pwm.c - pulse width modulation drivers
- * This file is part of the TinyG project
- *
- * Copyright (c) 2012 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2012 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "pwm.h"
 
index 4c246409f8a93705fec36df873a5db8d9c116b42..00119b353481d6c62fb8b480211437ffae34a57c 100644 (file)
--- a/src/pwm.h
+++ b/src/pwm.h
@@ -1,35 +1,30 @@
-/*
- * pwm.h - pulse width modulation drivers
- * This file is part of the TinyG project
- *
- * Copyright (c) 2012 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -75,5 +70,3 @@ extern pwmSingleton_t pwm;
 void pwm_init();
 stat_t pwm_set_freq(uint8_t channel, float freq);
 stat_t pwm_set_duty(uint8_t channel, float duty);
-
-
index 42b0f23c92c17ea740c4a0d6d3001452ce3f6afc..c49bd830060795ef1cb868cd54c4976b889b7a26 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index df6605724220a7ec3644ce39a66612bb3e86ca99..f42c963cf62f40d61f9a4b36bdd6a4472fa93db7 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
@@ -38,5 +34,3 @@ void report_init();
 void report_request();
 void report_request_full();
 stat_t report_callback();
-
-
index b99cc5f8d87aaf5c4661d54df7a1ced4f193f99b..eff59c9f3966db82c33b6361ba76cc24d97ae6b2 100644 (file)
@@ -1,40 +1,54 @@
 /******************************************************************************\
 
-   Siren Operated Sensor Firmware
-   Version IX
-  
-   Joseph Coffland
-   Cauldron Development LLC
-   November, 2013 - February 2014
+                This file is part of the Buildbotics firmware.
 
-\******************************************************************************/
-
-/*
-  This file defines an X-Macro ring buffer.  It can be used like this:
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-    #define RING_BUF_NAME tx_buf
-    #define RING_BUF_SIZE 256
-    #include "ringbuf.def"
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-  This will define the following functions:
+     The software 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
+               Lesser General Public License for more details.
 
-    void <name>_init();
-    int <name>_empty();
-    int <name>_full();
-    <type> <name>_peek();
-    void <name>_pop();
-    void <name>_push(<type> data);
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
-  Where <name> is defined by RING_BUF_NAME and <type> by RING_BUF_TYPE.
-  RING_BUF_SIZE defines the length of the ring buffer and must be a power of 2.
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
-  The data type and index type both default to uint8_t but can be changed by
-  defining RING_BUF_TYPE and RING_BUF_INDEX_TYPE respectively.
+\******************************************************************************/
 
-  By default these functions are declared static inline but this can be changed
-  by defining RING_BUF_FUNC.
-*/
+/* This file defines an X-Macro ring buffer.  It can be used like this:
+ *
+ *   #define RING_BUF_NAME tx_buf
+ *   #define RING_BUF_SIZE 256
+ *   #include "ringbuf.def"
+ *
+ * This will define the following functions:
+ *
+ *   void <name>_init();
+ *   int <name>_empty();
+ *   int <name>_full();
+ *   <type> <name>_peek();
+ *   void <name>_pop();
+ *   void <name>_push(<type> data);
+ *
+ * Where <name> is defined by RING_BUF_NAME and <type> by RING_BUF_TYPE.
+ * RING_BUF_SIZE defines the length of the ring buffer and must be a power of 2.
+ *
+ * The data type and index type both default to uint8_t but can be changed by
+ * defining RING_BUF_TYPE and RING_BUF_INDEX_TYPE respectively.
+ *
+ * By default these functions are declared static inline but this can be changed
+ * by defining RING_BUF_FUNC.
+ */
 
 #include <stdint.h>
 
index 63db2a981b49e4a154dac4589246811e9cdb4fee..03626f3f99c148d59f839e37c7fe2fcd703bd61a 100644 (file)
--- a/src/rtc.c
+++ b/src/rtc.c
@@ -1,25 +1,30 @@
-/*
- * rtc.h - real-time counter/clock
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2013 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2013 Alden S. Hart Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "rtc.h"
 
index f042cc5f78fdd67aec0314aabf5210955c478a50..8e41f792a1b6fdb10361c204c0cebe2d853cd582 100644 (file)
--- a/src/rtc.h
+++ b/src/rtc.h
@@ -1,25 +1,30 @@
-/*
- * rtc.h - general purpose real-time clock
- * Part of TinyG project
- *
- * Copyright (c) 2010 - 2013 Alden S. Hart Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2013 Alden S. Hart Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -42,5 +47,3 @@ extern rtClock_t rtc;
 
 void rtc_init(); // initialize and start general timer
 uint32_t rtc_get_time();
-
-
index cb76b8f6c226d31389302ab0ab793461a4995e70..607afa542612b8b6171ce16617322543c8f3b98e 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * spindle.c - canonical machine spindle driver
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                           All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "spindle.h"
 
index a6b21255997576c0340384c8260a32a3cd96e35f..188b34c9f10afd84db6805db8a0f633d06691ae4 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * spindle.h - spindle driver
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
@@ -43,5 +38,3 @@ void cm_exec_spindle_speed(float speed);            // callback for above
 
 stat_t cm_spindle_control(uint8_t spindle_mode);    // M3, M4, M5
 void cm_exec_spindle_control(uint8_t spindle_mode); // callback for above
-
-
index 2f3efcb4027586a9c92fea0617f2b36a66e8264e..769b2eca318d7801f3bdeefd39c6d288e74aa495 100644 (file)
@@ -1,26 +1,31 @@
-/*
- * status.c - TinyG - An embedded rs274/ngc CNC controller
- * This file is part of the TinyG project.
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2013 - 2015 Robert Giseburt
+                           All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #include "status.h"
 
index 95c644407d0408027e7528a9163c8a0aa83592cf..9203c8ab5673750644a1aea4b6e27d0472470221 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
@@ -46,9 +42,9 @@
  *  20 - 99    Generic internal and application errors. Internal errors start at
  *             20 and work up, Assertion failures start at 99 and work down.
  *
- * 100 - 129   Generic data and input errors - not specific to Gcode or TinyG
+ * 100 - 129   Generic data and input errors - not specific to Gcode
  *
- * 130 -       Gcode and TinyG application errors and warnings
+ * 130 -       Gcode and application errors and warnings
  *
  * See main.c for associated message strings. Any changes to the codes may also
  * require changing the message strings and string array in main.c
@@ -147,17 +143,17 @@ void print_status_message(const char *msg, stat_t status);
 #define STAT_GCODE_MODAL_GROUP_VIOLATION 133
 #define STAT_GCODE_AXIS_IS_MISSING 134
 #define STAT_GCODE_AXIS_CANNOT_BE_PRESENT 135
-#define STAT_GCODE_AXIS_IS_INVALID 136       
-#define STAT_GCODE_AXIS_IS_NOT_CONFIGURED 137           
-#define STAT_GCODE_AXIS_NUMBER_IS_MISSING 138           
-#define STAT_GCODE_AXIS_NUMBER_IS_INVALID 139           
-
-#define STAT_GCODE_ACTIVE_PLANE_IS_MISSING 140          
-#define STAT_GCODE_ACTIVE_PLANE_IS_INVALID 141          
-#define STAT_GCODE_FEEDRATE_NOT_SPECIFIED 142           
-#define STAT_GCODE_INVERSE_TIME_MODE_CANNOT_BE_USED 143 
-#define STAT_GCODE_ROTARY_AXIS_CANNOT_BE_USED 144       
-#define STAT_GCODE_G53_WITHOUT_G0_OR_G1 145             
+#define STAT_GCODE_AXIS_IS_INVALID 136
+#define STAT_GCODE_AXIS_IS_NOT_CONFIGURED 137
+#define STAT_GCODE_AXIS_NUMBER_IS_MISSING 138
+#define STAT_GCODE_AXIS_NUMBER_IS_INVALID 139
+
+#define STAT_GCODE_ACTIVE_PLANE_IS_MISSING 140
+#define STAT_GCODE_ACTIVE_PLANE_IS_INVALID 141
+#define STAT_GCODE_FEEDRATE_NOT_SPECIFIED 142
+#define STAT_GCODE_INVERSE_TIME_MODE_CANNOT_BE_USED 143
+#define STAT_GCODE_ROTARY_AXIS_CANNOT_BE_USED 144
+#define STAT_GCODE_G53_WITHOUT_G0_OR_G1 145
 #define STAT_REQUESTED_VELOCITY_EXCEEDS_LIMITS 146
 #define STAT_CUTTER_COMPENSATION_CANNOT_BE_ENABLED 147
 #define STAT_PROGRAMMED_POINT_SAME_AS_CURRENT_POINT 148
@@ -196,7 +192,7 @@ void print_status_message(const char *msg, stat_t status);
 #define STAT_T_WORD_IS_MISSING 178
 #define STAT_T_WORD_IS_INVALID 179
 
-// TinyG errors and warnings
+// Errors and warnings
 #define STAT_GENERIC_ERROR 200
 #define STAT_MINIMUM_LENGTH_MOVE 201         // move is less than minimum length
 #define STAT_MINIMUM_TIME_MOVE 202           // move is less than minimum time
@@ -230,5 +226,3 @@ void print_status_message(const char *msg, stat_t status);
 #define STAT_PROBE_ENDPOINT_IS_STARTING_POINT 251
 
 // Do not exceed 255 without also changing stat_t typedef
-
-
index 44260f7ccd9de9d51931dd497a9eb64b8f0ec217..ff146547771559f8fed6911f5e2c0f61e184ddf5 100644 (file)
@@ -1,40 +1,34 @@
-/*
- * stepper.c - stepper motor controls
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
 
-/* This module provides the low-level stepper drivers and some related
- * functions. See stepper.h for a detailed explanation of this module.
- */
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2013 - 2015 Robert Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
+// This module provides the low-level stepper drivers and some related
+// functions. See stepper.h for a detailed explanation of this module.
 
 #include "stepper.h"
 
@@ -512,7 +506,7 @@ stat_t st_prep_line(float travel_steps[], float following_error[],
       } else pre_mot->timer_clock = TC_CLKSEL_DIV2_gc;
     } else pre_mot->timer_clock = TC_CLKSEL_DIV1_gc;
 
-    pre_mot->timer_period = ticks_per_step * 2;
+    pre_mot->timer_period = ticks_per_step * 2; // TODO why do we need *2 here?
     pre_mot->steps = seg_clocks / ticks_per_step;
 
     if (false && usart_tx_empty() && motor == 0)
index 75510962215d290233a4e8a965dd2be3ba29f956..ddc7718940a4bdd55ba4ee0c919c985a8904bb72 100644 (file)
@@ -1,93 +1,83 @@
-/*
- * stepper.h - stepper motor interface
- * This file is part of TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- * Copyright (c) 2013 - 2015 Robert Giseburt
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with  other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                  Copyright (c) 2012 - 2015 Rob Giseburt
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 #pragma once
 
 
-/*
- * Coordinated motion (line drawing) is performed using a classic
- * Bresenham DDA.  A number of additional steps are taken to
- * optimize interpolation and pulse train timing accuracy to
- * minimize pulse jitter and make for very smooth motion and
- * surface finish.
+/* Coordinated motion (line drawing) is performed using a classic
+ * Bresenham DDA.  A number of additional steps are taken to optimize
+ * interpolation and pulse train timing accuracy to minimize pulse
+ * jitter and make for very smooth motion and surface finish.
  *
  * - The DDA is not used as a 'ramp' for acceleration
- *   management. Accel is computed upstream in the motion planner
- *   as 3rd order (controlled jerk) equations. These generate
- *   accel/decel segments that are passed to the DDA for step
- *   output.
- *
- * - The DDA accepts and processes fractional motor steps as
- *   floating point numbers from the planner. Steps do not need
- *   to be whole numbers, and are not expected to be.  The step
- *   values are converted to integer by multiplying by a
- *   fixed-point precision (DDA_SUBSTEPS, 100000). Rounding is
- *   performed to avoid a truncation bias.
- *
- * - Constant Rate DDA clock: The DDA runs at a constant, maximum
- *   rate for every segment regardless of actual step rate
- *   required. This means that the DDA clock is not tuned to the
- *   step rate (or a multiple) of the major axis, as is typical
- *   for most DDAs. Running the DDA flat out might appear to be
- *   "wasteful", but it ensures that the best aliasing results
- *   are achieved, and is part of maintaining step accuracy
- *   across motion segments.
- *
- *   The observation is that TinyG is a hard real-time system in
- *   which every clock cycle is knowable and can be accounted
- *   for. So if the system is capable of sustaining max pulse
- *   rate for the fastest move, it's capable of sustaining this
- *   rate for any move. So we just run it flat out and get the
- *   best pulse resolution for all moves.  If we were running
- *   from batteries or otherwise cared about the energy budget we
- *   might not be so cavalier about this.
- *
- *   At 50 KHz constant clock rate we have 20 uSec between pulse
- *   timer (DDA) interrupts.  On the Xmega we consume <10 uSec in
- *   the interrupt - a whopping 50% of available cycles going
- *   into pulse generation.
- *
- * - Pulse timing is also helped by minimizing the time spent
- *   loading the next move segment. The time budget for the load
- *   is less than the time remaining before the next DDA clock
- *   tick. This means that the load must take < 10 uSec or the
- *   time between pulses will stretch out when changing
- *   segments. This does not affect positional accuracy but it
- *   would affect jitter and smoothness. To this end as much as
- *   possible about that move is pre-computed during move
- *   execution (prep cycles).  Also, all moves are loaded from
- *   the DDA interrupt level (HI), avoiding the need for mutual
+ *   management. Accel is computed upstream in the motion planner as
+ *   3rd order (controlled jerk) equations. These generate accel/decel
+ *   segments that are passed to the DDA for step output.
+ *
+ * - The DDA accepts and processes fractional motor steps as floating
+ *   point numbers from the planner. Steps do not need to be whole
+ *   numbers, and are not expected to be.  The step values are
+ *   converted to integer by multiplying by a fixed-point precision
+ *   (DDA_SUBSTEPS, 100000). Rounding is performed to avoid a
+ *   truncation bias.
+ *
+ * - Constant Rate DDA clock: The DDA runs at a constant, maximum rate
+ *   for every segment regardless of actual step rate required. This
+ *   means that the DDA clock is not tuned to the step rate (or a
+ *   multiple) of the major axis, as is typical for most DDAs. Running
+ *   the DDA flat out might appear to be "wasteful", but it ensures
+ *   that the best aliasing results are achieved, and is part of
+ *   maintaining step accuracy across motion segments.
+ *
+ *   The observation is this firmware is a hard real-time system in
+ *   which every clock cycle is knowable and can be accounted for. So
+ *   if the system is capable of sustaining max pulse rate for the
+ *   fastest move, it's capable of sustaining this rate for any
+ *   move. So we just run it flat out and get the best pulse
+ *   resolution for all moves.  If we were running from batteries or
+ *   otherwise cared about the energy budget we might not be so
+ *   cavalier about this.
+ *
+ *   At 50 KHz constant clock rate we have 20 uSec between pulse timer
+ *   (DDA) interrupts.  On the Xmega we consume <10 uSec in the
+ *   interrupt - a whopping 50% of available cycles going into pulse
+ *   generation.
+ *
+ * - Pulse timing is also helped by minimizing the time spent loading
+ *   the next move segment. The time budget for the load is less than
+ *   the time remaining before the next DDA clock tick. This means
+ *   that the load must take < 10 uSec or the time between pulses will
+ *   stretch out when changing segments. This does not affect
+ *   positional accuracy but it would affect jitter and smoothness. To
+ *   this end as much as possible about that move is pre-computed
+ *   during move execution (prep cycles).  Also, all moves are loaded
+ *   from the DDA interrupt level (HI), avoiding the need for mutual
  *   exclusion locking or volatiles (which slow things down).
  */
 
index d0eb5173418429e4b213ad8306908dec53cddafb..fd8a18d5ba940a6b902e55cd2d13a7f830886e2d 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * switch.c - switch handling functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* Switch Modes
  *
@@ -62,8 +57,6 @@
 #include <stdbool.h>
 
 
-static void _switch_isr_helper(uint8_t sw_num);
-
 /* Initialize homing/limit switches
  *
  * This function assumes sys_init() and st_init() have been run previously to
@@ -78,7 +71,7 @@ void switch_init() {
     if (sw.mode[MIN_SWITCH(i)] != SW_MODE_DISABLED) {
       // set min input - see 13.14.14
       hw.sw_port[i]->DIRCLR = SW_MIN_BIT_bm;
-      hw.sw_port[i]->PIN6CTRL = (PIN_MODE | PORT_ISC_BOTHEDGES_gc);
+      hw.sw_port[i]->PIN6CTRL = PIN_MODE | PORT_ISC_BOTHEDGES_gc;
       // interrupt on min switch
       hw.sw_port[i]->INT0MASK = SW_MIN_BIT_bm;
 
@@ -87,7 +80,7 @@ void switch_init() {
     if (sw.mode[MAX_SWITCH(i)] != SW_MODE_DISABLED) {
       // set max input - see 13.14.14
       hw.sw_port[i]->DIRCLR = SW_MAX_BIT_bm;
-      hw.sw_port[i]->PIN7CTRL = (PIN_MODE | PORT_ISC_BOTHEDGES_gc);
+      hw.sw_port[i]->PIN7CTRL = PIN_MODE | PORT_ISC_BOTHEDGES_gc;
       hw.sw_port[i]->INT1MASK = SW_MAX_BIT_bm; // max on INT1
 
     } else hw.sw_port[i]->INT1MASK = 0;
@@ -111,8 +104,7 @@ void switch_init() {
 }
 
 
-/*
- * These functions interact with each other to process switch closures
+/* These functions interact with each other to process switch closures
  * and firing.  Each switch has a counter which is initially set to
  * negative SW_DEGLITCH_TICKS.  When a switch closure is DETECTED the
  * count increments for each RTC tick.  When the count reaches zero
@@ -120,17 +112,6 @@ void switch_init() {
  * increment positive until the lockout is exceeded.
  */
 
-// Switch interrupt handler vectors
-ISR(X_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_X);}
-ISR(Y_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_Y);}
-ISR(Z_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_Z);}
-ISR(A_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_A);}
-ISR(X_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_X);}
-ISR(Y_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_Y);}
-ISR(Z_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_Z);}
-ISR(A_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_A);}
-
-
 static void _switch_isr_helper(uint8_t sw_num) {
   if (sw.mode[sw_num] == SW_MODE_DISABLED) return; // never supposed to happen
   if (sw.debounce[sw_num] == SW_LOCKOUT) return;   // switch is in lockout
@@ -145,6 +126,17 @@ static void _switch_isr_helper(uint8_t sw_num) {
 }
 
 
+// Switch interrupt handler vectors
+ISR(X_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_X);}
+ISR(Y_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_Y);}
+ISR(Z_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_Z);}
+ISR(A_MIN_ISR_vect) {_switch_isr_helper(SW_MIN_A);}
+ISR(X_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_X);}
+ISR(Y_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_Y);}
+ISR(Z_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_Z);}
+ISR(A_MAX_ISR_vect) {_switch_isr_helper(SW_MAX_A);}
+
+
 /// Called from RTC for each RTC tick
 void switch_rtc_callback() {
   for (uint8_t i = 0; i < NUM_SWITCHES; i++) {
index 8fd98bd72700e4ab093133561a67d09e8d0cca66..1f4f7db34cb47747a6318a42dfcf9eabc477e0a3 100644 (file)
@@ -1,36 +1,32 @@
-/*
- * switch.h - switch handling functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2013 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
-/* Switch processing functions under Motate
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                           All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
+/* Switch processing functions
  *
  * Switch processing turns pin transitions into reliable switch states.
  * There are 2 main operations:
 #define SW_DEGLITCH_TICKS 3          // 3=30ms
 
 // switch modes
-#define SW_HOMING_BIT         1
-#define SW_LIMIT_BIT          2
-#define SW_MODE_DISABLED      0               // disabled for all operations
+enum {
+  SW_MODE_DISABLED,
+  SW_HOMING_BIT,
+  SW_LIMIT_BIT
+};
+
 #define SW_MODE_HOMING        SW_HOMING_BIT   // enable switch for homing only
 #define SW_MODE_LIMIT         SW_LIMIT_BIT    // enable switch for limits only
 #define SW_MODE_HOMING_LIMIT  (SW_HOMING_BIT | SW_LIMIT_BIT) // homing & limits
-#define SW_MODE_MAX_VALUE     SW_MODE_HOMING_LIMIT
 
 enum swType {
-  SW_TYPE_NORMALLY_OPEN = 0,
+  SW_TYPE_NORMALLY_OPEN,
   SW_TYPE_NORMALLY_CLOSED
 };
 
 enum swState {
   SW_DISABLED = -1,
-  SW_OPEN = 0,  // also read as 'false'
-  SW_CLOSED     // also read as 'true'
+  SW_OPEN,
+  SW_CLOSED
 };
 
 // macros for finding the index into the switch table give the axis number
@@ -79,13 +77,13 @@ enum swState {
 #define MAX_SWITCH(axis) (axis * 2 + 1)
 
 enum swDebounce { // state machine for managing debouncing and lockout
-  SW_IDLE = 0,
+  SW_IDLE,
   SW_DEGLITCHING,
   SW_LOCKOUT
 };
 
 enum swNums { // indexes into switch arrays
-  SW_MIN_X = 0,
+  SW_MIN_X,
   SW_MAX_X,
   SW_MIN_Y,
   SW_MAX_Y,
@@ -96,11 +94,11 @@ enum swNums { // indexes into switch arrays
   NUM_SWITCHES // must be last one. Used for array sizing and for loops
 };
 #define SW_OFFSET SW_MAX_X // offset between MIN and MAX switches
-#define NUM_SWITCH_PAIRS (NUM_SWITCHES/2)
+#define NUM_SWITCH_PAIRS (NUM_SWITCHES / 2)
 
 /// Interrupt levels and vectors - The vectors are hard-wired to xmega ports
 /// If you change axis port assignments you need to change these, too.
-#define GPIO1_INTLVL (PORT_INT0LVL_MED_gc|PORT_INT1LVL_MED_gc)
+#define GPIO1_INTLVL (PORT_INT0LVL_MED_gc | PORT_INT1LVL_MED_gc)
 
 // port assignments for vectors
 #define X_MIN_ISR_vect PORTA_INT0_vect
@@ -112,10 +110,9 @@ enum swNums { // indexes into switch arrays
 #define Z_MAX_ISR_vect PORTE_INT1_vect
 #define A_MAX_ISR_vect PORTF_INT1_vect
 
-/*
- * Switch control structures
- // Note 1: The term "thrown" is used because switches could be normally-open
- //           or normally-closed. "Thrown" means activated or hit.
+/* Switch control structures
+ * Note 1: The term "thrown" is used because switches could be normally-open
+ * or normally-closed. "Thrown" means activated or hit.
  */
 struct swStruct {                       // switch state
   uint8_t switch_type;                  // 0=NO, 1=NC - applies to all switches
index f537b4f4368b2af36b89c3df97dcf8f7ab6a2c6d..89300730a7ae18f5aaa5357ab20034150d78d4ba 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index 5460dd70b757543a2a88149065cb5c0d5ef1fbb9..ef8605de680653ffbf81f75738fd82350bfcef41 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index 502db7b169ed209ad9b70a1148a6e0d9e1d05784..9633d5af226d364c009f9eb205ba83feba0af886 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                   Copyright (c) 2015-2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index 58fb9945d423fedec6fc04288d233c04d401a579..bbe8bc8816a0f5ff23f4010a8cf4384588a12734 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                   Copyright (c) 2015-2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
@@ -75,5 +71,3 @@ int16_t usart_tx_fill();
 int16_t usart_tx_space();
 inline int usart_tx_empty() {return !usart_tx_fill();}
 inline int usart_tx_full() {return !usart_tx_space();}
-
-
index 4f883c343eaa588fc85a1e434fa1ccf17d3e7ff4..ad4cea541647bb549e0329d25dc2f2316cbdeb51 100644 (file)
@@ -1,35 +1,30 @@
-/*
- * util.c - a random assortment of useful functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2015 Alden S. Hart, Jr.
+                            All rights reserved.
+
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
 
 /* util contains:
  *   - math and min/max utilities and extensions
index c6a7767060fb891ce3c631886c8c228e1c36305d..162ee255676dacc73593f8da0e0447837238816d 100644 (file)
@@ -1,42 +1,36 @@
-/*
- * util.h - a random assortment of useful functions
- * This file is part of the TinyG project
- *
- * Copyright (c) 2010 - 2014 Alden S. Hart, Jr.
- *
- * This file ("the software") is free software: you can redistribute
- * it and/or modify it under the terms of the GNU General Public
- * License, version 2 as published by the Free Software
- * Foundation. You should have received a copy of the GNU General
- * Public License, version 2 along with the software.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * As a special exception, you may use this file as part of a software
- * library without restriction. Specifically, if other files
- * instantiate templates or use macros or inline functions from this
- * file, or you compile this file and link it with other files to
- * produce an executable, this file does not by itself cause the
- * resulting executable to be covered by the GNU General Public
- * License. This exception does not however invalidate any other
- * reasons why the executable file might be covered by the GNU General
- * Public License.
- *
- * THE SOFTWARE IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
- * WITHOUT ANY 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.
- */
+/******************************************************************************\
+
+                This file is part of the Buildbotics firmware.
+
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                  Copyright (c) 2010 - 2014 Alden S. Hart, Jr.
+                            All rights reserved.
 
-/* util.c/.h contains a dog's breakfast of supporting functions that are
- * not specific to tinyg: including:
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
+
+     The software 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
+               Lesser General Public License for more details.
+
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
+
+                For information regarding this software email:
+                  "Joseph Coffland" <joseph@buildbotics.com>
+
+\******************************************************************************/
+
+/* Supporting functions including:
  *
- *      - math and min/max utilities and extensions
- *      - vector manipulation utilities
- *      - support for debugging routines
+ *    - math and min/max utilities and extensions
+ *    - vector manipulation utilities
+ *    - support for debugging routines
  */
 
 #pragma once
@@ -129,5 +123,3 @@ uint16_t compute_checksum(char const *string, const uint16_t length);
 #ifndef M_SQRT3
 #define M_SQRT3 (1.73205080756888)
 #endif
-
-
index 65c006774efb167dc5a0ad7e04c7e274cdaeb1b4..a839f6dced20cb1f4b8d416bfbe8b9ae3d2d822e 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index f797ae1e13034d4c3651c413128947beb39cbaf8..d9d6916846c6e3110f4762bb7ab9f09fc69c6975 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/
 
index 9656a78cec0fe46a534faa04462b08de7049e3b7..6ff8864fd9cc735d974ebc21d228f222c10999ca 100644 (file)
@@ -1,31 +1,27 @@
 /******************************************************************************\
 
-                   This file is part of the TinyG firmware.
+                This file is part of the Buildbotics firmware.
 
-                     Copyright (c) 2016, Buildbotics LLC
-                             All rights reserved.
+                  Copyright (c) 2015 - 2016 Buildbotics LLC
+                            All rights reserved.
 
-        The C! library is free software: you can redistribute it and/or
-        modify it under the terms of the GNU Lesser General Public License
-        as published by the Free Software Foundation, either version 2.1 of
-        the License, or (at your option) any later version.
+     This file ("the software") is free software: you can redistribute it
+     and/or modify it under the terms of the GNU General Public License,
+      version 2 as published by the Free Software Foundation. You should
+      have received a copy of the GNU General Public License, version 2
+     along with the software. If not, see <http://www.gnu.org/licenses/>.
 
-        The C! library 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
-        Lesser General Public License for more details.
+     The software 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
+               Lesser General Public License for more details.
 
-        You should have received a copy of the GNU Lesser General Public
-        License along with the C! library.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-        In addition, BSD licensing may be granted on a case by case basis
-        by written permission from at least one of the copyright holders.
-        You may request written permission by emailing the authors.
+       You should have received a copy of the GNU Lesser General Public
+                License along with the software.  If not, see
+                       <http://www.gnu.org/licenses/>.
 
                 For information regarding this software email:
-                               Joseph Coffland
-                            joseph@buildbotics.com
+                  "Joseph Coffland" <joseph@buildbotics.com>
 
 \******************************************************************************/