summaryrefslogtreecommitdiff
path: root/src/components/motor/MotorController.cpp
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2021-09-12 11:08:25 +0300
committerRiku Isokoski <riksu9000@gmail.com>2021-09-12 11:08:25 +0300
commit3ee4876214b70c107cabbb54f865e646e99f0d73 (patch)
treeab0ba3a25b6a598b0371598ed72fea5af95adb97 /src/components/motor/MotorController.cpp
parentcdf5801efeafd7f0ee05cbe23198856efb9890e3 (diff)
Toggle notifications only, keep vibrations.
Diffstat (limited to 'src/components/motor/MotorController.cpp')
-rw-r--r--src/components/motor/MotorController.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index b25e6bc8..c79ecdd2 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -8,9 +8,6 @@ APP_TIMER_DEF(longVibTimer);
using namespace Pinetime::Controllers;
-MotorController::MotorController(Controllers::Settings& settingsController) : settingsController {settingsController} {
-}
-
void MotorController::Init() {
nrf_gpio_cfg_output(pinMotor);
nrf_gpio_pin_set(pinMotor);
@@ -26,18 +23,11 @@ void MotorController::Ring(void* p_context) {
}
void MotorController::RunForDuration(uint8_t motorDuration) {
- if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF) {
- return;
- }
-
nrf_gpio_pin_clear(pinMotor);
app_timer_start(shortVibTimer, APP_TIMER_TICKS(motorDuration), nullptr);
}
void MotorController::StartRinging() {
- if (settingsController.GetVibrationStatus() == Controllers::Settings::Vibration::OFF) {
- return;
- }
Ring(this);
app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
}