From e4dd12fe584014450a8c0d76daf0ff4dd96db621 Mon Sep 17 00:00:00 2001 From: Sonny Jeon Date: Mon, 19 Dec 2016 18:48:40 -0700 Subject: [PATCH] Spindle PWM update for Mega2560 - Spindle PWM is set with a 16-bit value, rather than 8-bit on a 328p. Updated stepper.c to reflect this change. --- doc/log/commit_log_v1.1.txt | 13 +++++++++++++ grbl/grbl.h | 2 +- grbl/stepper.c | 4 ++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 doc/log/commit_log_v1.1.txt diff --git a/doc/log/commit_log_v1.1.txt b/doc/log/commit_log_v1.1.txt new file mode 100644 index 0000000..92ad955 --- /dev/null +++ b/doc/log/commit_log_v1.1.txt @@ -0,0 +1,13 @@ +---------------- +Date: 2016-12-19 +Author: Sonny Jeon +Subject: Grbl v1.1e port to Mega2560 branch + +- v1.1e + +- Ported all current changes from the main Grbl 328p repo to the +Mega2560 branch. Main differences are increased planner, RX, TX, and +line buffers. And an optional sleep timeout feature. + +- WARNING: Code compiles, but has not been tested. + diff --git a/grbl/grbl.h b/grbl/grbl.h index f98227d..bc94555 100644 --- a/grbl/grbl.h +++ b/grbl/grbl.h @@ -23,7 +23,7 @@ // Grbl versioning system #define GRBL_VERSION "1.1e" -#define GRBL_VERSION_BUILD "20161219" +#define GRBL_VERSION_BUILD "20161219.2" // Define standard libraries used by Grbl. #include diff --git a/grbl/stepper.c b/grbl/stepper.c index 1dc2b77..8fe38a5 100644 --- a/grbl/stepper.c +++ b/grbl/stepper.c @@ -78,7 +78,7 @@ typedef struct { #else uint8_t prescaler; // Without AMASS, a prescaler is required to adjust for slow timing. #endif - uint8_t spindle_pwm; + uint16_t spindle_pwm; } segment_t; static segment_t segment_buffer[SEGMENT_BUFFER_SIZE]; @@ -152,7 +152,7 @@ typedef struct { float decelerate_after; // Deceleration ramp start measured from end of block (mm) float inv_rate; // Used by PWM laser mode to speed up segment calculations. - uint8_t current_spindle_pwm; + uint16_t current_spindle_pwm; } st_prep_t; static st_prep_t prep;