InfiniTime.git

commit 7b115fe42c596356004c10ec123b76db85ee81f3

Author: Jean-François Milants <jf@codingfield.com>

Merge branch 'develop' of github.com:JF002/Pinetime into develop

 src/components/motor/MotorController.cpp | 2 +-


diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index 90e41d203ff930f2f9263793721134e760aa4636..db6103f42427b2c7c5eadb63861560214e71dcbd 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -19,7 +19,7 @@   motorController->RunForDuration(50);
 }
 
 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);
   }
 }