Merge pull request #351 from Avamander/patch-5
Fixed a naming inconsistency of DisplayApp::ReturnApp and a few formatting errors
This commit is contained in:
commit
a0acc0e8d2
|
@ -65,7 +65,7 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
|
||||||
notificationManager {notificationManager},
|
notificationManager {notificationManager},
|
||||||
heartRateController {heartRateController},
|
heartRateController {heartRateController},
|
||||||
settingsController {settingsController},
|
settingsController {settingsController},
|
||||||
motorController{motorController},
|
motorController {motorController},
|
||||||
motionController {motionController} {
|
motionController {motionController} {
|
||||||
msgQueue = xQueueCreate(queueSize, itemSize);
|
msgQueue = xQueueCreate(queueSize, itemSize);
|
||||||
// Start clock when smartwatch boots
|
// Start clock when smartwatch boots
|
||||||
|
@ -213,7 +213,7 @@ void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||||
LoadApp(app, direction);
|
LoadApp(app, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayApp::returnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent) {
|
void DisplayApp::ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent) {
|
||||||
returnToApp = app;
|
returnToApp = app;
|
||||||
returnDirection = direction;
|
returnDirection = direction;
|
||||||
returnTouchEvent = touchEvent;
|
returnTouchEvent = touchEvent;
|
||||||
|
@ -224,12 +224,12 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||||
SetFullRefresh(direction);
|
SetFullRefresh(direction);
|
||||||
|
|
||||||
// default return to launcher
|
// default return to launcher
|
||||||
returnApp(Apps::Launcher, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Launcher, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
|
|
||||||
switch (app) {
|
switch (app) {
|
||||||
case Apps::Launcher:
|
case Apps::Launcher:
|
||||||
currentScreen = std::make_unique<Screens::ApplicationList>(this, settingsController, batteryController, dateTimeController);
|
currentScreen = std::make_unique<Screens::ApplicationList>(this, settingsController, batteryController, dateTimeController);
|
||||||
returnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::None:
|
case Apps::None:
|
||||||
case Apps::Clock:
|
case Apps::Clock:
|
||||||
|
@ -245,7 +245,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||||
|
|
||||||
case Apps::FirmwareValidation:
|
case Apps::FirmwareValidation:
|
||||||
currentScreen = std::make_unique<Screens::FirmwareValidation>(this, validator);
|
currentScreen = std::make_unique<Screens::FirmwareValidation>(this, validator);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::FirmwareUpdate:
|
case Apps::FirmwareUpdate:
|
||||||
currentScreen = std::make_unique<Screens::FirmwareUpdate>(this, bleController);
|
currentScreen = std::make_unique<Screens::FirmwareUpdate>(this, bleController);
|
||||||
|
@ -254,54 +254,54 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
|
||||||
case Apps::Notifications:
|
case Apps::Notifications:
|
||||||
currentScreen = std::make_unique<Screens::Notifications>(
|
currentScreen = std::make_unique<Screens::Notifications>(
|
||||||
this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Normal);
|
this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Normal);
|
||||||
returnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
|
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
|
||||||
break;
|
break;
|
||||||
case Apps::NotificationsPreview:
|
case Apps::NotificationsPreview:
|
||||||
currentScreen = std::make_unique<Screens::Notifications>(
|
currentScreen = std::make_unique<Screens::Notifications>(
|
||||||
this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview);
|
this, notificationManager, systemTask.nimble().alertService(), Screens::Notifications::Modes::Preview);
|
||||||
returnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
|
ReturnApp(Apps::Clock, FullRefreshDirections::Up, TouchEvents::SwipeUp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
case Apps::QuickSettings:
|
case Apps::QuickSettings:
|
||||||
currentScreen =
|
currentScreen = std::make_unique<Screens::QuickSettings>(
|
||||||
std::make_unique<Screens::QuickSettings>(this, batteryController, dateTimeController, brightnessController, motorController, settingsController);
|
this, batteryController, dateTimeController, brightnessController, motorController, settingsController);
|
||||||
returnApp(Apps::Clock, FullRefreshDirections::LeftAnim, TouchEvents::SwipeLeft);
|
ReturnApp(Apps::Clock, FullRefreshDirections::LeftAnim, TouchEvents::SwipeLeft);
|
||||||
break;
|
break;
|
||||||
case Apps::Settings:
|
case Apps::Settings:
|
||||||
currentScreen = std::make_unique<Screens::Settings>(this, settingsController);
|
currentScreen = std::make_unique<Screens::Settings>(this, settingsController);
|
||||||
returnApp(Apps::QuickSettings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::QuickSettings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingWatchFace:
|
case Apps::SettingWatchFace:
|
||||||
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, settingsController);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingTimeFormat:
|
case Apps::SettingTimeFormat:
|
||||||
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingWakeUp:
|
case Apps::SettingWakeUp:
|
||||||
currentScreen = std::make_unique<Screens::SettingWakeUp>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingWakeUp>(this, settingsController);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingDisplay:
|
case Apps::SettingDisplay:
|
||||||
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::BatteryInfo:
|
case Apps::BatteryInfo:
|
||||||
currentScreen = std::make_unique<Screens::BatteryInfo>(this, batteryController);
|
currentScreen = std::make_unique<Screens::BatteryInfo>(this, batteryController);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
case Apps::SysInfo:
|
case Apps::SysInfo:
|
||||||
currentScreen =
|
currentScreen =
|
||||||
std::make_unique<Screens::SystemInfo>(this, dateTimeController, batteryController, brightnessController, bleController, watchdog);
|
std::make_unique<Screens::SystemInfo>(this, dateTimeController, batteryController, brightnessController, bleController, watchdog);
|
||||||
returnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
ReturnApp(Apps::Settings, FullRefreshDirections::Down, TouchEvents::SwipeDown);
|
||||||
break;
|
break;
|
||||||
//
|
//
|
||||||
|
|
||||||
case Apps::FlashLight:
|
case Apps::FlashLight:
|
||||||
currentScreen = std::make_unique<Screens::FlashLight>(this, systemTask, brightnessController);
|
currentScreen = std::make_unique<Screens::FlashLight>(this, systemTask, brightnessController);
|
||||||
returnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None);
|
ReturnApp(Apps::Clock, FullRefreshDirections::Down, TouchEvents::None);
|
||||||
break;
|
break;
|
||||||
case Apps::StopWatch:
|
case Apps::StopWatch:
|
||||||
currentScreen = std::make_unique<Screens::StopWatch>(this);
|
currentScreen = std::make_unique<Screens::StopWatch>(this);
|
||||||
|
|
|
@ -103,7 +103,7 @@ namespace Pinetime {
|
||||||
static void Process(void* instance);
|
static void Process(void* instance);
|
||||||
void InitHw();
|
void InitHw();
|
||||||
void Refresh();
|
void Refresh();
|
||||||
void returnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent);
|
void ReturnApp(Apps app, DisplayApp::FullRefreshDirections direction, TouchEvents touchEvent);
|
||||||
void LoadApp(Apps app, DisplayApp::FullRefreshDirections direction);
|
void LoadApp(Apps app, DisplayApp::FullRefreshDirections direction);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user