From 3ee4876214b70c107cabbb54f865e646e99f0d73 Mon Sep 17 00:00:00 2001 From: Riku Isokoski Date: Sun, 12 Sep 2021 11:08:25 +0300 Subject: Toggle notifications only, keep vibrations. --- src/components/motor/MotorController.cpp | 10 ---------- src/components/motor/MotorController.h | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-) (limited to 'src/components/motor') 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); } diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h index d2c9fe5f..574b86c8 100644 --- a/src/components/motor/MotorController.h +++ b/src/components/motor/MotorController.h @@ -2,7 +2,6 @@ #include #include "app_timer.h" -#include "components/settings/Settings.h" namespace Pinetime { namespace Controllers { @@ -10,7 +9,8 @@ namespace Pinetime { class MotorController { public: - MotorController(Controllers::Settings& settingsController); + MotorController() = default; + void Init(); void RunForDuration(uint8_t motorDuration); void StartRinging(); @@ -18,7 +18,6 @@ namespace Pinetime { private: static void Ring(void* p_context); - Controllers::Settings& settingsController; static void StopMotor(void* p_context); }; } -- cgit v1.2.3