CQ_KIT_Ver1_5
Dependencies: mbed RateLimiter BLDCmotorDriverCQ_KIT_Ver1_5
Diff: X_NUCLEO_IHM07M1/SPN7Driver.cpp
- Revision:
- 8:9a6444df4256
- Parent:
- 7:022c306baeb9
- Child:
- 11:0120619cdfb7
--- a/X_NUCLEO_IHM07M1/SPN7Driver.cpp Mon Oct 17 15:27:00 2016 +0000 +++ b/X_NUCLEO_IHM07M1/SPN7Driver.cpp Tue Oct 18 10:28:09 2016 +0000 @@ -93,11 +93,11 @@ /**************************************************************************/ /** @brief Set duty cycle for motor control - * @param dc duty cycle value (positive for clockwise spin) + * @param dc duty cycle value */ /**************************************************************************/ void SPN7Driver::setDutyCycle(float dc) { - if (dc >= -1 && dc <= 1) { + if (dc >0 && dc <= 1) { ticker.attach(this, &SPN7Driver::commutation, sampleTime); tempDutyCycle = dc; } else {