Fix build issues since Metronome app has been merged.

This commit is contained in:
Jean-François Milants 2021-06-12 15:14:14 +02:00
parent c575754b42
commit d6fcbe960e
2 changed files with 4 additions and 4 deletions

View File

@ -358,7 +358,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
currentScreen = std::make_unique<Screens::HeartRate>(this, heartRateController, *systemTask); currentScreen = std::make_unique<Screens::HeartRate>(this, heartRateController, *systemTask);
break; break;
case Apps::Metronome: case Apps::Metronome:
currentScreen = std::make_unique<Screens::Metronome>(this, motorController, systemTask); currentScreen = std::make_unique<Screens::Metronome>(this, motorController, *systemTask);
break; break;
case Apps::Motion: case Apps::Motion:
currentScreen = std::make_unique<Screens::Motion>(this, motionController); currentScreen = std::make_unique<Screens::Motion>(this, motionController);

View File

@ -89,7 +89,7 @@ Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorControl
Metronome::~Metronome() { Metronome::~Metronome() {
app->SetTouchMode(DisplayApp::TouchModes::Gestures); app->SetTouchMode(DisplayApp::TouchModes::Gestures);
systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); systemTask.PushMessage(System::Messages::EnableSleeping);
lv_obj_clean(lv_scr_act()); lv_obj_clean(lv_scr_act());
} }
@ -151,12 +151,12 @@ void Metronome::OnEvent(lv_obj_t* obj, lv_event_t event) {
switch (currentState) { switch (currentState) {
case States::Stopped: { case States::Stopped: {
lv_label_set_text(playPauseLabel, Symbols::play); lv_label_set_text(playPauseLabel, Symbols::play);
systemTask.PushMessage(Pinetime::System::SystemTask::Messages::EnableSleeping); systemTask.PushMessage(System::Messages::EnableSleeping);
break; break;
} }
case States::Running: { case States::Running: {
lv_label_set_text(playPauseLabel, Symbols::pause); lv_label_set_text(playPauseLabel, Symbols::pause);
systemTask.PushMessage(Pinetime::System::SystemTask::Messages::DisableSleeping); systemTask.PushMessage(System::Messages::DisableSleeping);
startTime = xTaskGetTickCount(); startTime = xTaskGetTickCount();
counter = 1; counter = 1;
break; break;