Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:JF002/Pinetime into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JF002 committed Oct 2, 2022
2 parents c9b1fb8 + 1439dfd commit 7b115fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/motor/MotorController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 7b115fe

Please sign in to comment.