diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-04-17 09:01:12 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-04-17 09:07:56 (GMT) |
| commit | c37e38517c60a45fca5a03d64962a8f95bf46114 (patch) | |
| tree | cc0dcdd68bba5467c17d2cd35f58b66a2c096faf | |
| parent | d73be76905c131c9d459cbb4e44be4bfc87dfddb (diff) | |
Remove systemTask reference from MotorController
| -rw-r--r-- | src/components/motor/MotorController.cpp | 4 | ||||
| -rw-r--r-- | src/components/motor/MotorController.h | 3 | ||||
| -rw-r--r-- | src/systemtask/SystemTask.cpp | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp index 714bff6..6eff2ee 100644 --- a/src/components/motor/MotorController.cpp +++ b/src/components/motor/MotorController.cpp @@ -9,9 +9,7 @@ APP_TIMER_DEF(longVibTimer); using namespace Pinetime::Controllers; -void MotorController::Init(System::SystemTask* systemTask) { - this->systemTask = systemTask; - +void MotorController::Init() { nrf_gpio_cfg_output(PinMap::Motor); nrf_gpio_pin_set(PinMap::Motor); diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h index 99a4e64..8dfa2bd 100644 --- a/src/components/motor/MotorController.h +++ b/src/components/motor/MotorController.h @@ -20,10 +20,9 @@ namespace Pinetime { protected: friend class Pinetime::System::SystemTask; - void Init(System::SystemTask* systemTask); + void Init(); private: - System::SystemTask* systemTask = nullptr; static void Ring(TimerHandle_t xTimer); static void StopMotor(TimerHandle_t xTimer); TimerHandle_t shortVibTimer; diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index ad73063..5a0a99d 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -155,7 +155,7 @@ void SystemTask::Work() { touchPanel.Init(); dateTimeController.Register(this); batteryController.Register(this); - motorController.Init(this); + motorController.Init(); motionSensor.SoftReset(); timerController.Init(this); alarmController.Init(this); |
