From 9e0ce55dbc3eb8267509e1084071e04fb5f15443 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Mon, 19 Nov 2012 17:39:40 -0700 Subject: [PATCH] Updated interface protocol. Fixed M2 bug. - Updated interface protocol to play nicer with interface programs. All Grbl responses beginning with '$' signifies a setting. Bracketed '[]' responses are feedback messages containing either state, parameter, or general messages. Chevron '<>' response are from the real-time status messages, i.e. position. - M2 Program end command was causing a system alarm. Fixed. Thanks @blinkenlight ! --- defaults.h | 24 ++++++++++++------------ planner.c | 5 +++-- report.c | 52 ++++++++++++++++++++++++++-------------------------- stepper.c | 2 -- 4 files changed, 41 insertions(+), 42 deletions(-) diff --git a/defaults.h b/defaults.h index 3e9e0b4..279e4b9 100644 --- a/defaults.h +++ b/defaults.h @@ -29,14 +29,14 @@ #ifdef DEFAULTS_GENERIC // Grbl generic default settings. Should work across different machines. - #define DEFAULT_X_STEPS_PER_MM 250 - #define DEFAULT_Y_STEPS_PER_MM 250 - #define DEFAULT_Z_STEPS_PER_MM 250 + #define DEFAULT_X_STEPS_PER_MM 250.0 + #define DEFAULT_Y_STEPS_PER_MM 250.0 + #define DEFAULT_Z_STEPS_PER_MM 250.0 #define DEFAULT_STEP_PULSE_MICROSECONDS 10 #define DEFAULT_MM_PER_ARC_SEGMENT 0.1 #define DEFAULT_RAPID_FEEDRATE 500.0 // mm/min #define DEFAULT_FEEDRATE 250.0 - #define DEFAULT_ACCELERATION 10*60*60 // 10 mm/min^2 + #define DEFAULT_ACCELERATION (10.0*60*60) // 10 mm/min^2 #define DEFAULT_JUNCTION_DEVIATION 0.05 // mm #define DEFAULT_STEPPING_INVERT_MASK ((1<\r\n")); } diff --git a/stepper.c b/stepper.c index 129ccd8..28e6f50 100755 --- a/stepper.c +++ b/stepper.c @@ -420,8 +420,6 @@ static void set_step_events_per_minute(uint32_t steps_per_minute) // Planner external interface to start stepper interrupt and execute the blocks in queue. Called // by the main program functions: planner auto-start and run-time command execution. -// TODO: Update sys.cycle_start and feed_hold variables to a sys.state variable. This state -// variable will manage all of Grbl's processes and keep them separate. void st_cycle_start() { if (sys.state == STATE_QUEUED) {