mirror of
https://github.com/gnea/grbl-Mega.git
synced 2026-09-24 12:24:04 +08:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
+1
-1
@@ -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 <avr/io.h>
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user