File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ void spindle_init()
107107
108108uint8_t spindle_get_state ()
109109{
110- uint8_t pin = 0 ;
110+ uint16_t pin = 0 ;
111111 #ifdef VARIABLE_SPINDLE
112112 #ifdef USE_SPINDLE_DIR_AS_ENABLE_PIN
113113#ifdef AVRTARGET
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ uint8_t spindle_get_state();
4141// Called by spindle_sync() after sync and parking motion/spindle stop override during restore.
4242#ifdef VARIABLE_SPINDLE
4343#ifdef STM32F103C8
44- #define SPINDLE_PWM_TYPE uint16_t
44+ #define SPINDLE_PWM_TYPE uint32_t
4545#else
4646#define SPINDLE_PWM_TYPE uint8_t
4747#endif
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ typedef struct {
143143 uint8_t prescaler ; // Without AMASS, a prescaler is required to adjust for slow timing.
144144 #endif
145145 #ifdef VARIABLE_SPINDLE
146- uint8_t spindle_pwm ;
146+ uint32_t spindle_pwm ;
147147 #endif
148148} segment_t ;
149149static segment_t segment_buffer [SEGMENT_BUFFER_SIZE ];
@@ -233,7 +233,7 @@ typedef struct {
233233
234234 #ifdef VARIABLE_SPINDLE
235235 float inv_rate ; // Used by PWM laser mode to speed up segment calculations.
236- uint8_t current_spindle_pwm ;
236+ uint32_t current_spindle_pwm ;
237237 #endif
238238} st_prep_t ;
239239static st_prep_t prep ;
@@ -548,7 +548,7 @@ void Timer1Proc()
548548 #endif
549549
550550 #ifdef VARIABLE_SPINDLE
551- // Set real-time spindle output as segment is loaded, just prior to the first step.
551+ // Set real-time spindle output as segment is loaded, just prior to the first step. CMMT
552552 spindle_set_speed (st .exec_segment -> spindle_pwm );
553553 #endif
554554
You can’t perform that action at this time.
0 commit comments