summaryrefslogtreecommitdiff
path: root/src/components/motor
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-13 18:39:38 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-13 18:39:38 (GMT)
commit569e6fea41c13f33ad1374bb80ca489aaf4a7037 (patch)
treed3ec0a05dfaaae60346bca4413b312daa859b4e4 /src/components/motor
parent3115e7c58d3f4c936a68b3756fb8e37663b12830 (diff)
Sans notification (notification manager retained as it seems to be used by the dfu manager)
Diffstat (limited to 'src/components/motor')
-rw-r--r--src/components/motor/MotorController.cpp12
-rw-r--r--src/components/motor/MotorController.h2
2 files changed, 0 insertions, 14 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index bee07fb..24aeeb0 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -5,7 +5,6 @@
#include "drivers/PinMap.h"
APP_TIMER_DEF(shortVibTimer);
-APP_TIMER_DEF(longVibTimer);
using namespace Pinetime::Controllers;
@@ -14,7 +13,6 @@ void MotorController::Init() {
nrf_gpio_pin_set(PinMap::Motor);
app_timer_create(&shortVibTimer, APP_TIMER_MODE_SINGLE_SHOT, StopMotor);
- app_timer_create(&longVibTimer, APP_TIMER_MODE_REPEATED, Ring);
}
void MotorController::Ring(void* p_context) {
@@ -27,16 +25,6 @@ void MotorController::RunForDuration(uint8_t motorDuration) {
app_timer_start(shortVibTimer, APP_TIMER_TICKS(motorDuration), nullptr);
}
-void MotorController::StartRinging() {
- Ring(this);
- app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
-}
-
-void MotorController::StopRinging() {
- app_timer_stop(longVibTimer);
- nrf_gpio_pin_set(PinMap::Motor);
-}
-
void MotorController::StopMotor(void* p_context) {
nrf_gpio_pin_set(PinMap::Motor);
}
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
index b5a592b..3117f5c 100644
--- a/src/components/motor/MotorController.h
+++ b/src/components/motor/MotorController.h
@@ -11,8 +11,6 @@ namespace Pinetime {
void Init();
void RunForDuration(uint8_t motorDuration);
- void StartRinging();
- void StopRinging();
private:
static void Ring(void* p_context);