summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorpetter <39340152+petterhs@users.noreply.github.com>2021-01-25 15:47:52 (GMT)
committerjlukanc <27705324+jlukanc1@users.noreply.github.com>2021-01-25 17:45:04 (GMT)
commit3dd88339f39089232c40f043a478b9ba47cb1dad (patch)
tree6f43eaac7fb7fc70a1932d1722d99492f6160938 /src/main.cpp
parentf27e63290639ca257e88298b60429d72271c4954 (diff)
create motorcontroller in main and pass by reference
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 3b993ee..78a2cf5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,6 +30,7 @@
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "components/ble/NotificationManager.h"
+#include "components/motor/MotorController.h"
#include "components/datetime/DateTimeController.h"
#include "displayapp/DisplayApp.h"
#include "displayapp/LittleVgl.h"
@@ -99,6 +100,7 @@ static constexpr uint8_t pinTouchIrq = 28;
std::unique_ptr<Pinetime::System::SystemTask> systemTask;
Pinetime::Controllers::NotificationManager notificationManager;
+Pinetime::Controllers::MotorController motorController;
void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) {
if(pin == pinTouchIrq) {
@@ -241,7 +243,7 @@ int main(void) {
debounceTimer = xTimerCreate ("debounceTimer", 200, pdFALSE, (void *) 0, DebounceTimerCallback);
systemTask.reset(new Pinetime::System::SystemTask(spi, lcd, spiNorFlash, twiMaster, touchPanel, lvgl, batteryController, bleController,
- dateTimeController, notificationManager, heartRateSensor));
+ dateTimeController, notificationManager, motorController, heartRateSensor));
systemTask->Start();
nimble_port_init();