Skip to content

Commit 99b3f9d

Browse files
committed
teensy 3 and 4 bugfix for 6pwm, forgotten PhaseState parameter
1 parent df5f6de commit 99b3f9d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/drivers/hardware_specific/teensy/teensy3_mcu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ void* _configure6PWM(long pwm_frequency, float dead_zone, const int pinA_h, cons
206206
// function setting the pwm duty cycle to the hardware
207207
// - Stepper motor - 6PWM setting
208208
// - hardware specific
209-
void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, void* params){
209+
void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, PhaseState *phase_state, void* params){
210+
_UNUSED(phase_state);
210211
// transform duty cycle from [0,1] to [0,255]
211212
// phase A
212213
analogWrite(((GenericDriverParams*)params)->pins[0], 255.0f*dc_a);

src/drivers/hardware_specific/teensy/teensy4_mcu.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ void* _configure6PWM(long pwm_frequency, float dead_zone, const int pinA_h, cons
290290
// function setting the pwm duty cycle to the hardware
291291
// - Stepper motor - 6PWM setting
292292
// - hardware specific
293-
void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, void* params){
293+
void _writeDutyCycle6PWM(float dc_a, float dc_b, float dc_c, PhaseState *phase_state, void* params){
294+
_UNUSED(phase_state);
294295
write_pwm_pair (((Teensy4DriverParams*)params)->flextimers[0], ((Teensy4DriverParams*)params)->submodules[0], dc_a);
295296
write_pwm_pair (((Teensy4DriverParams*)params)->flextimers[1], ((Teensy4DriverParams*)params)->submodules[1], dc_b);
296297
write_pwm_pair (((Teensy4DriverParams*)params)->flextimers[2], ((Teensy4DriverParams*)params)->submodules[2], dc_c);

0 commit comments

Comments
 (0)