summaryrefslogtreecommitdiff
path: root/src/components/motor
diff options
context:
space:
mode:
authorMark Russell <mruss660@gmail.com>2021-09-10 22:40:13 (GMT)
committerMark Russell <mruss660@gmail.com>2021-09-10 22:40:13 (GMT)
commit1fb5757655c1cdf0e93f03ad27869e8c043d69f0 (patch)
tree398a6762e69a9ba41f4cbd4e9f8f9995c94cfb21 /src/components/motor
parent6f9f0e8b0e42a5526d47ca664534fb6b0ccb6ace (diff)
Created basic alarm app
Diffstat (limited to 'src/components/motor')
-rw-r--r--src/components/motor/MotorController.cpp6
-rw-r--r--src/components/motor/MotorController.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index b25e6bc..5ade19e 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -42,6 +42,12 @@ void MotorController::StartRinging() {
app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
}
+// This function is the same as StartRinging(), but will ring even if notifications are turned off in Settings
+void MotorController::StartRingingDisregardSettings() {
+ Ring(this);
+ app_timer_start(longVibTimer, APP_TIMER_TICKS(1000), this);
+}
+
void MotorController::StopRinging() {
app_timer_stop(longVibTimer);
nrf_gpio_pin_set(pinMotor);
diff --git a/src/components/motor/MotorController.h b/src/components/motor/MotorController.h
index d2c9fe5..d3b96b0 100644
--- a/src/components/motor/MotorController.h
+++ b/src/components/motor/MotorController.h
@@ -15,6 +15,7 @@ namespace Pinetime {
void RunForDuration(uint8_t motorDuration);
void StartRinging();
static void StopRinging();
+ void StartRingingDisregardSettings();
private:
static void Ring(void* p_context);