Minor re-factoring. Fix an issue with parking and spindle restore.
- Altered the report counters to be count down, rather than count up. Simplified some of the logic. - Fixed an issue with parking restore. The spindle state would disable then reenable. - Clarified some of the config.h descriptions. - Moved the compile-time checks from config.h to grbl.h. They don’t belong in the config.h file. - Refactored the initialization of the system variables in main.c. System position and probe position were undefined when power cycled, but were zero anyway. Added clear vector code to make it explicit.
This commit is contained in:
parent
498dd62572
commit
f8ca08ad66
10 changed files with 122 additions and 86 deletions
43
grbl/grbl.h
43
grbl/grbl.h
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
// Grbl versioning system
|
||||
#define GRBL_VERSION "1.1d"
|
||||
#define GRBL_VERSION_BUILD "20161023"
|
||||
#define GRBL_VERSION_BUILD "20161024"
|
||||
|
||||
// Define standard libraries used by Grbl.
|
||||
#include <avr/io.h>
|
||||
|
|
@ -61,4 +61,45 @@
|
|||
#include "stepper.h"
|
||||
#include "jog.h"
|
||||
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// COMPILE-TIME ERROR CHECKING OF DEFINE VALUES:
|
||||
|
||||
#ifndef HOMING_CYCLE_0
|
||||
#error "Required HOMING_CYCLE_0 not defined."
|
||||
#endif
|
||||
|
||||
#if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN) && !defined(VARIABLE_SPINDLE)
|
||||
#error "USE_SPINDLE_DIR_AS_ENABLE_PIN may only be used with VARIABLE_SPINDLE enabled"
|
||||
#endif
|
||||
|
||||
#if defined(USE_SPINDLE_DIR_AS_ENABLE_PIN) && !defined(CPU_MAP_ATMEGA328P)
|
||||
#error "USE_SPINDLE_DIR_AS_ENABLE_PIN may only be used with a 328p processor"
|
||||
#endif
|
||||
|
||||
#if defined(PARKING_ENABLE)
|
||||
#if defined(HOMING_FORCE_SET_ORIGIN)
|
||||
#error "HOMING_FORCE_SET_ORIGIN is not supported with PARKING_ENABLE at this time."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SPINDLE_MINIMUM_PWM)
|
||||
#if !(SPINDLE_MINIMUM_PWM > 0)
|
||||
#error "SPINDLE_MINIMUM_PWM must be greater than zero."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (REPORT_WCO_REFRESH_BUSY_COUNT < REPORT_WCO_REFRESH_IDLE_COUNT)
|
||||
#error "WCO busy refresh is less than idle refresh."
|
||||
#endif
|
||||
#if (REPORT_OVR_REFRESH_BUSY_COUNT < REPORT_OVR_REFRESH_IDLE_COUNT)
|
||||
#error "Override busy refresh is less than idle refresh."
|
||||
#endif
|
||||
#if (REPORT_WCO_REFRESH_IDLE_COUNT < 2)
|
||||
#error "WCO refresh must be greater than one."
|
||||
#endif
|
||||
#if (REPORT_OVR_REFRESH_IDLE_COUNT < 1)
|
||||
#error "Override refresh must be greater than zero."
|
||||
#endif
|
||||
// ---------------------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue