create motorcontroller in main and pass by reference
This commit is contained in:
@@ -3,12 +3,16 @@
|
||||
|
||||
using namespace Pinetime::Applications::Screens;
|
||||
|
||||
Notifications::Notifications(DisplayApp *app, Pinetime::Controllers::NotificationManager ¬ificationManager, Modes mode) :
|
||||
Screen(app), notificationManager{notificationManager}, mode{mode} {
|
||||
Notifications::Notifications(DisplayApp *app,
|
||||
Pinetime::Controllers::NotificationManager ¬ificationManager,
|
||||
Pinetime::Controllers::MotorController& motorController,
|
||||
Modes mode) :
|
||||
Screen(app), notificationManager{notificationManager},
|
||||
motorController{motorController}, mode{mode} {
|
||||
|
||||
notificationManager.ClearNewNotificationFlag();
|
||||
auto notification = notificationManager.GetLastNotification();
|
||||
|
||||
motorController.Init(); //start the vibration timer setups
|
||||
|
||||
if(notification.valid) {
|
||||
currentId = notification.id;
|
||||
|
Reference in New Issue
Block a user