summaryrefslogtreecommitdiff
path: root/src/components/motor
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-10-02 18:06:16 +0200
committerJean-François Milants <jf@codingfield.com>2022-10-02 18:06:16 +0200
commit7b115fe42c596356004c10ec123b76db85ee81f3 (patch)
tree0c4d1d37370cf358b60bb6468de21ddad3bbf169 /src/components/motor
parentc9b1fb82446390be637374bb11ca53770c9d09f5 (diff)
parent1439dfd912c284aaed35eed7d211d34d3aaec4fa (diff)
Merge branch 'develop' of github.com:JF002/Pinetime into develop
Diffstat (limited to 'src/components/motor')
-rw-r--r--src/components/motor/MotorController.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index 90e41d20..db6103f4 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -19,7 +19,7 @@ void MotorController::Ring(TimerHandle_t xTimer) {
}
void MotorController::RunForDuration(uint8_t motorDuration) {
- if (xTimerChangePeriod(shortVib, pdMS_TO_TICKS(motorDuration), 0) == pdPASS && xTimerStart(shortVib, 0) == pdPASS) {
+ if (motorDuration > 0 && xTimerChangePeriod(shortVib, pdMS_TO_TICKS(motorDuration), 0) == pdPASS && xTimerStart(shortVib, 0) == pdPASS) {
nrf_gpio_pin_clear(PinMap::Motor);
}
}