grbl-LPC-CoreXY/grbl/settings.h

143 lines
5.4 KiB
C
Raw Normal View History

2009-01-25 00:48:56 +01:00
/*
settings.h - eeprom configuration handling
2014-08-07 13:58:04 +02:00
Part of Grbl v0.9
2009-01-25 00:48:56 +01:00
Copyright (c) 2012-2015 Sungeun K. Jeon
2009-01-25 00:48:56 +01:00
Grbl is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Grbl is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Grbl. If not, see <http://www.gnu.org/licenses/>.
*/
2014-08-07 13:58:04 +02:00
/*
This file is based on work from Grbl v0.8, distributed under the
terms of the MIT-license. See COPYING for more details.
Copyright (c) 2009-2011 Simen Svale Skogsrud
Copyright (c) 2011-2012 Sungeun K. Jeon
*/
2009-01-25 00:48:56 +01:00
2011-02-05 00:45:41 +01:00
#ifndef settings_h
#define settings_h
2009-01-25 00:48:56 +01:00
#include "grbl.h"
Lots of re-organization and cleaning-up. Some bug fixes. - Added a new source and header file called system. These files contain the system commands and variables, as well as all of the system headers and standard libraries Grbl uses. Centralizing some of the code. - Re-organized the include headers throughout the source code. - ENABLE_M7 define was missing from config.h. Now there. - SPINDLE_MAX_RPM and SPINDLE_MIN_RPM now defined in config.h. No uncommenting to prevent user issues. Minimum spindle RPM now provides the lower, near 0V, scale adjustment, i.e. some spindles can go really slow so why use up our 256 voltage bins for them? - Remove some persistent variables from coolant and spindle control. They were redundant. - Removed a VARIABLE_SPINDLE define in cpu_map.h that shouldn’t have been there. - Changed the DEFAULT_ARC_TOLERANCE to 0.002mm to improve arc tracing. Before we had issues with performance, no longer. - Fixed a bug with the hard limits and the software debounce feature enabled. The invert limit pin setting wasn’t honored. - Fixed a bug with the homing direction mask. Now is like it used to be. At least for now. - Re-organized main.c to serve as only as the reset/initialization routine. Makes things a little bit clearer in terms of execution procedures. - Re-organized protocol.c as the overall master control unit for execution procedures. Not quite there yet, but starting to make a little more sense in how things are run. - Removed updating of old settings records. So many new settings have been added that it’s not worth adding the code to migrate old user settings. - Tweaked spindle_control.c a bit and made it more clear and consistent with other parts of Grbl. - Tweaked the stepper disable bit code in stepper.c. Requires less flash memory.
2014-01-11 04:22:10 +01:00
// Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl
// when firmware is upgraded. Always stored in byte 0 of eeprom
#define SETTINGS_VERSION 9 // NOTE: Check settings_reset() when moving to next version.
// Define bit flag masks for the boolean settings in settings.flag.
#define BITFLAG_REPORT_INCHES bit(0)
// #define BITFLAG_AUTO_START bit(1) // Obsolete. Don't alter to keep back compatibility.
#define BITFLAG_INVERT_ST_ENABLE bit(2)
#define BITFLAG_HARD_LIMIT_ENABLE bit(3)
#define BITFLAG_HOMING_ENABLE bit(4)
#define BITFLAG_SOFT_LIMIT_ENABLE bit(5)
#define BITFLAG_INVERT_LIMIT_PINS bit(6)
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
#define BITFLAG_INVERT_PROBE_PIN bit(7)
// Define status reporting boolean enable bit flags in settings.status_report_mask
#define BITFLAG_RT_STATUS_MACHINE_POSITION bit(0)
#define BITFLAG_RT_STATUS_WORK_POSITION bit(1)
#define BITFLAG_RT_STATUS_PLANNER_BUFFER bit(2)
#define BITFLAG_RT_STATUS_SERIAL_RX bit(3)
// Define EEPROM memory address location values for Grbl settings and parameters
// NOTE: The Atmega328p has 1KB EEPROM. The upper half is reserved for parameters and
// the startup script. The lower half contains the global settings and space for future
// developments.
#define EEPROM_ADDR_GLOBAL 1U
#define EEPROM_ADDR_PARAMETERS 512U
#define EEPROM_ADDR_STARTUP_BLOCK 768U
#define EEPROM_ADDR_BUILD_INFO 942U
// Define EEPROM address indexing for coordinate parameters
#define N_COORDINATE_SYSTEM 6 // Number of supported work coordinate systems (from index 1)
#define SETTING_INDEX_NCOORD N_COORDINATE_SYSTEM+1 // Total number of system stored (from index 0)
// NOTE: Work coordinate indices are (0=G54, 1=G55, ... , 6=G59)
#define SETTING_INDEX_G28 N_COORDINATE_SYSTEM // Home position 1
#define SETTING_INDEX_G30 N_COORDINATE_SYSTEM+1 // Home position 2
// #define SETTING_INDEX_G92 N_COORDINATE_SYSTEM+2 // Coordinate offset (G92.2,G92.3 not supported)
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Define Grbl axis settings numbering scheme. Starts at START_VAL, every INCREMENT, over N_SETTINGS.
#define AXIS_N_SETTINGS 4
#define AXIS_SETTINGS_START_VAL 100 // NOTE: Reserving settings values >= 100 for axis settings. Up to 255.
#define AXIS_SETTINGS_INCREMENT 10 // Must be greater than the number of axis settings
// Global persistent settings (Stored from byte EEPROM_ADDR_GLOBAL onwards)
typedef struct {
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Axis settings
float steps_per_mm[N_AXIS];
float max_rate[N_AXIS];
float acceleration[N_AXIS];
float max_travel[N_AXIS];
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Remaining Grbl settings
uint8_t pulse_microseconds;
uint8_t step_invert_mask;
uint8_t dir_invert_mask;
uint8_t stepper_idle_lock_time; // If max value 255, steppers do not disable.
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
uint8_t status_report_mask; // Mask to indicate desired report data.
float junction_deviation;
float arc_tolerance;
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
uint8_t flags; // Contains default boolean settings
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
uint8_t homing_dir_mask;
float homing_feed_rate;
float homing_seek_rate;
uint16_t homing_debounce_delay;
float homing_pulloff;
} settings_t;
extern settings_t settings;
// Initialize the configuration subsystem (load settings from EEPROM)
2011-02-05 00:45:41 +01:00
void settings_init();
// Helper functions to clear and restore EEPROM defaults
void settings_restore_global_settings();
void settings_clear_parameters();
void settings_clear_startup_line();
void settings_clear_build_info();
// A helper method to set new settings from command line
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
uint8_t settings_store_global_setting(uint8_t parameter, float value);
2009-01-25 00:48:56 +01:00
New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing. (All v0.8 features installed. Still likely buggy, but now thourough testing will need to start to squash them all. As soon as we're done, this will be pushed to master and v0.9 development will be started. Please report ANY issues to us so we can get this rolled out ASAP.) - User startup script! A user can now save one (up to 5 as compile-time option) block of g-code in EEPROM memory. This will be run everytime Grbl resets. Mainly to be used as a way to set your preferences, like G21, G54, etc. - New dry run and check g-code switches. Dry run moves ALL motions at rapids rate ignoring spindle, coolant, and dwell commands. For rapid physical proofing of your code. The check g-code switch ignores all motion and provides the user a way to check if there are any errors in their program that Grbl may not like. - Program restart! (sort of). Program restart is typically an advanced feature that allows users to restart a program mid-stream. The check g-code switch can perform this feature by enabling the switch at the start of the program, and disabling it at the desired point with some minimal changes. - New system state variable. This state variable tracks all of the different state processes that Grbl performs, i.e. cycle start, feed hold, homing, etc. This is mainly for making managing of these task easier and more clear. - Position lost state variable. Only when homing is enabled, Grbl will refuse to move until homing is completed and position is known. This is mainly for safety. Otherwise, it will let users fend for themselves. - Moved the default settings defines into config.h. The plan is to eventually create a set of config.h's for particular as-built machines to help users from doing it themselves. - Moved around misc defines into .h files. And lots of other little things.
2012-11-03 18:32:23 +01:00
// Stores the protocol line variable as a startup line in EEPROM
void settings_store_startup_line(uint8_t n, char *line);
// Reads an EEPROM startup line to the protocol line variable
uint8_t settings_read_startup_line(uint8_t n, char *line);
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Stores build info user-defined string
void settings_store_build_info(char *line);
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Reads build info user-defined string
uint8_t settings_read_build_info(char *line);
// Writes selected coordinate data to EEPROM
void settings_write_coord_data(uint8_t coord_select, float *coord_data);
// Reads selected coordinate data from EEPROM
uint8_t settings_read_coord_data(uint8_t coord_select, float *coord_data);
Settings refactoring. Bug fixes. Misc new features. This is likely the last major change to the v0.9 code base before push to master. Only two minor things remain on the agenda (CoreXY support, force clear EEPROM, and an extremely low federate bug). - NEW! Grbl is now compile-able and may be flashed directly through the Arduino IDE. Only minor changes were required for this compatibility. See the Wiki to learn how to do it. - New status reporting mask to turn on and off what Grbl sends back. This includes machine coordinates, work coordinates, serial RX buffer usage, and planner buffer usage. Expandable to more information on user request, but that’s it for now. - Settings have been completely renumbered to allow for future new settings to be installed without having to constantly reshuffle and renumber all of the settings every time. - All settings masks have been standardized to mean bit 0 = X, bit 1 = Y, and bit 2 = Z, to reduce confusion on how they work. The invert masks used by the internal Grbl system were updated to accommodate this change as well. - New invert probe pin setting, which does what it sounds like. - Fixed a probing cycle bug, where it would freeze intermittently, and removed some redundant code. - Homing may now be set to the origin wherever the limit switches are. Traditionally machine coordinates should always be in negative space, but when limit switches on are on the opposite side, the machine coordinate would be set to -max_travel for the axis. Now you can always make it [0,0,0] via a compile-time option in config.h. (Soft limits routine was updated to account for this as well.) - Probe coordinate message immediately after a probing cycle may now be turned off via a compile-time option in config.h. By default the probing location is always reported. - Reduced the N_ARC_CORRECTION default value to reflect the changes in how circles are generated by an arc tolerance, rather than a fixed arc segment setting. - Increased the incoming line buffer limit from 70 to 80 characters. Had some extra memory space to invest into this. - Fixed a bug where tool number T was not being tracked and reported correctly. - Added a print free memory function for debugging purposes. Not used otherwise. - Realtime rate report should now work during feed holds, but it hasn’t been tested yet. - Updated the streaming scripts with MIT-license and added the simple streaming to the main stream.py script to allow for settings to be sent. - Some minor code refactoring to improve flash efficiency. Reduced the flash by several hundred KB, which was re-invested in some of these new features.
2014-07-26 23:01:34 +02:00
// Returns the step pin mask according to Grbl's internal axis numbering
uint8_t get_step_pin_mask(uint8_t i);
// Returns the direction pin mask according to Grbl's internal axis numbering
uint8_t get_direction_pin_mask(uint8_t i);
// Returns the limit pin mask according to Grbl's internal axis numbering
uint8_t get_limit_pin_mask(uint8_t i);
2009-01-25 00:48:56 +01:00
#endif