Skip to content

Commit cac0484

Browse files
author
Richard Unger
committed
set driver initialized flag
1 parent 00e550e commit cac0484

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/drivers/BLDCDriver3PWM.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ int BLDCDriver3PWM::init() {
5757
// Set the pwm frequency to the pins
5858
// hardware specific function - depending on driver and mcu
5959
params = _configure3PWM(pwm_frequency, pwmA, pwmB, pwmC);
60+
initialized = (params!=SIMPLEFOC_DRIVER_INIT_FAILED);
6061
return params!=SIMPLEFOC_DRIVER_INIT_FAILED;
6162
}
6263

src/drivers/BLDCDriver6PWM.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ int BLDCDriver6PWM::init() {
5959
// configure 6pwm
6060
// hardware specific function - depending on driver and mcu
6161
params = _configure6PWM(pwm_frequency, dead_zone, pwmA_h,pwmA_l, pwmB_h,pwmB_l, pwmC_h,pwmC_l);
62+
initialized = (params!=SIMPLEFOC_DRIVER_INIT_FAILED);
6263
return params!=SIMPLEFOC_DRIVER_INIT_FAILED;
6364
}
6465

src/drivers/StepperDriver2PWM.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ int StepperDriver2PWM::init() {
8080
// Set the pwm frequency to the pins
8181
// hardware specific function - depending on driver and mcu
8282
params = _configure2PWM(pwm_frequency, pwm1, pwm2);
83+
initialized = (params!=SIMPLEFOC_DRIVER_INIT_FAILED);
8384
return params!=SIMPLEFOC_DRIVER_INIT_FAILED;
8485
}
8586

src/drivers/StepperDriver4PWM.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ int StepperDriver4PWM::init() {
5555
// Set the pwm frequency to the pins
5656
// hardware specific function - depending on driver and mcu
5757
params = _configure4PWM(pwm_frequency, pwm1A, pwm1B, pwm2A, pwm2B);
58+
initialized = (params!=SIMPLEFOC_DRIVER_INIT_FAILED);
5859
return params!=SIMPLEFOC_DRIVER_INIT_FAILED;
5960
}
6061

0 commit comments

Comments
 (0)