screens: Remove unused DisplayApp parameters
This commit is contained in:
parent
c78211952e
commit
26478d9006
72 changed files with 99 additions and 156 deletions
|
@ -361,8 +361,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||||
break;
|
break;
|
||||||
case Apps::None:
|
case Apps::None:
|
||||||
case Apps::Clock:
|
case Apps::Clock:
|
||||||
currentScreen = std::make_unique<Screens::Clock>(this,
|
currentScreen = std::make_unique<Screens::Clock>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -373,18 +372,18 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Apps::Error:
|
case Apps::Error:
|
||||||
currentScreen = std::make_unique<Screens::Error>(this, bootError);
|
currentScreen = std::make_unique<Screens::Error>(bootError);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Apps::FirmwareValidation:
|
case Apps::FirmwareValidation:
|
||||||
currentScreen = std::make_unique<Screens::FirmwareValidation>(this, validator);
|
currentScreen = std::make_unique<Screens::FirmwareValidation>(validator);
|
||||||
break;
|
break;
|
||||||
case Apps::FirmwareUpdate:
|
case Apps::FirmwareUpdate:
|
||||||
currentScreen = std::make_unique<Screens::FirmwareUpdate>(this, bleController);
|
currentScreen = std::make_unique<Screens::FirmwareUpdate>(bleController);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Apps::PassKey:
|
case Apps::PassKey:
|
||||||
currentScreen = std::make_unique<Screens::PassKey>(this, bleController.GetPairingKey());
|
currentScreen = std::make_unique<Screens::PassKey>(bleController.GetPairingKey());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Apps::Notifications:
|
case Apps::Notifications:
|
||||||
|
@ -404,11 +403,10 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||||
Screens::Notifications::Modes::Preview);
|
Screens::Notifications::Modes::Preview);
|
||||||
break;
|
break;
|
||||||
case Apps::Timer:
|
case Apps::Timer:
|
||||||
currentScreen = std::make_unique<Screens::Timer>(this, timerController);
|
currentScreen = std::make_unique<Screens::Timer>(timerController);
|
||||||
break;
|
break;
|
||||||
case Apps::Alarm:
|
case Apps::Alarm:
|
||||||
currentScreen =
|
currentScreen = std::make_unique<Screens::Alarm>(alarmController, settingsController.GetClockType(), *systemTask, motorController);
|
||||||
std::make_unique<Screens::Alarm>(this, alarmController, settingsController.GetClockType(), *systemTask, motorController);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
@ -428,31 +426,31 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||||
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, settingsController, filesystem);
|
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, settingsController, filesystem);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingTimeFormat:
|
case Apps::SettingTimeFormat:
|
||||||
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingTimeFormat>(settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingWakeUp:
|
case Apps::SettingWakeUp:
|
||||||
currentScreen = std::make_unique<Screens::SettingWakeUp>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingWakeUp>(settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingDisplay:
|
case Apps::SettingDisplay:
|
||||||
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingSteps:
|
case Apps::SettingSteps:
|
||||||
currentScreen = std::make_unique<Screens::SettingSteps>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingSteps>(settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingSetDateTime:
|
case Apps::SettingSetDateTime:
|
||||||
currentScreen = std::make_unique<Screens::SettingSetDateTime>(this, dateTimeController, settingsController);
|
currentScreen = std::make_unique<Screens::SettingSetDateTime>(this, dateTimeController, settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingChimes:
|
case Apps::SettingChimes:
|
||||||
currentScreen = std::make_unique<Screens::SettingChimes>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingChimes>(settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingShakeThreshold:
|
case Apps::SettingShakeThreshold:
|
||||||
currentScreen = std::make_unique<Screens::SettingShakeThreshold>(this, settingsController, motionController, *systemTask);
|
currentScreen = std::make_unique<Screens::SettingShakeThreshold>(settingsController, motionController, *systemTask);
|
||||||
break;
|
break;
|
||||||
case Apps::SettingBluetooth:
|
case Apps::SettingBluetooth:
|
||||||
currentScreen = std::make_unique<Screens::SettingBluetooth>(this, settingsController);
|
currentScreen = std::make_unique<Screens::SettingBluetooth>(this, settingsController);
|
||||||
break;
|
break;
|
||||||
case Apps::BatteryInfo:
|
case Apps::BatteryInfo:
|
||||||
currentScreen = std::make_unique<Screens::BatteryInfo>(this, batteryController);
|
currentScreen = std::make_unique<Screens::BatteryInfo>(batteryController);
|
||||||
break;
|
break;
|
||||||
case Apps::SysInfo:
|
case Apps::SysInfo:
|
||||||
currentScreen = std::make_unique<Screens::SystemInfo>(this,
|
currentScreen = std::make_unique<Screens::SystemInfo>(this,
|
||||||
|
@ -465,37 +463,37 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
|
||||||
touchPanel);
|
touchPanel);
|
||||||
break;
|
break;
|
||||||
case Apps::FlashLight:
|
case Apps::FlashLight:
|
||||||
currentScreen = std::make_unique<Screens::FlashLight>(this, *systemTask, brightnessController);
|
currentScreen = std::make_unique<Screens::FlashLight>(*systemTask, brightnessController);
|
||||||
break;
|
break;
|
||||||
case Apps::StopWatch:
|
case Apps::StopWatch:
|
||||||
currentScreen = std::make_unique<Screens::StopWatch>(this, *systemTask);
|
currentScreen = std::make_unique<Screens::StopWatch>(*systemTask);
|
||||||
break;
|
break;
|
||||||
case Apps::Twos:
|
case Apps::Twos:
|
||||||
currentScreen = std::make_unique<Screens::Twos>(this);
|
currentScreen = std::make_unique<Screens::Twos>();
|
||||||
break;
|
break;
|
||||||
case Apps::Paint:
|
case Apps::Paint:
|
||||||
currentScreen = std::make_unique<Screens::InfiniPaint>(this, lvgl, motorController);
|
currentScreen = std::make_unique<Screens::InfiniPaint>(lvgl, motorController);
|
||||||
break;
|
break;
|
||||||
case Apps::Paddle:
|
case Apps::Paddle:
|
||||||
currentScreen = std::make_unique<Screens::Paddle>(this, lvgl);
|
currentScreen = std::make_unique<Screens::Paddle>(lvgl);
|
||||||
break;
|
break;
|
||||||
case Apps::Music:
|
case Apps::Music:
|
||||||
currentScreen = std::make_unique<Screens::Music>(this, systemTask->nimble().music());
|
currentScreen = std::make_unique<Screens::Music>(systemTask->nimble().music());
|
||||||
break;
|
break;
|
||||||
case Apps::Navigation:
|
case Apps::Navigation:
|
||||||
currentScreen = std::make_unique<Screens::Navigation>(this, systemTask->nimble().navigation());
|
currentScreen = std::make_unique<Screens::Navigation>(systemTask->nimble().navigation());
|
||||||
break;
|
break;
|
||||||
case Apps::HeartRate:
|
case Apps::HeartRate:
|
||||||
currentScreen = std::make_unique<Screens::HeartRate>(this, heartRateController, *systemTask);
|
currentScreen = std::make_unique<Screens::HeartRate>(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>(motorController, *systemTask);
|
||||||
break;
|
break;
|
||||||
case Apps::Motion:
|
case Apps::Motion:
|
||||||
currentScreen = std::make_unique<Screens::Motion>(this, motionController);
|
currentScreen = std::make_unique<Screens::Motion>(motionController);
|
||||||
break;
|
break;
|
||||||
case Apps::Steps:
|
case Apps::Steps:
|
||||||
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
|
currentScreen = std::make_unique<Screens::Steps>(motionController, settingsController);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
currentApp = app;
|
currentApp = app;
|
||||||
|
|
|
@ -40,8 +40,7 @@ static void StopAlarmTaskCallback(lv_task_t* task) {
|
||||||
screen->StopAlerting();
|
screen->StopAlerting();
|
||||||
}
|
}
|
||||||
|
|
||||||
Alarm::Alarm(DisplayApp* app,
|
Alarm::Alarm(Controllers::AlarmController& alarmController,
|
||||||
Controllers::AlarmController& alarmController,
|
|
||||||
Controllers::Settings::ClockType clockType,
|
Controllers::Settings::ClockType clockType,
|
||||||
System::SystemTask& systemTask,
|
System::SystemTask& systemTask,
|
||||||
Controllers::MotorController& motorController)
|
Controllers::MotorController& motorController)
|
||||||
|
|
|
@ -28,8 +28,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Alarm : public Screen {
|
class Alarm : public Screen {
|
||||||
public:
|
public:
|
||||||
Alarm(DisplayApp* app,
|
Alarm(Controllers::AlarmController& alarmController,
|
||||||
Controllers::AlarmController& alarmController,
|
|
||||||
Controllers::Settings::ClockType clockType,
|
Controllers::Settings::ClockType clockType,
|
||||||
System::SystemTask& systemTask,
|
System::SystemTask& systemTask,
|
||||||
Controllers::MotorController& motorController);
|
Controllers::MotorController& motorController);
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
BatteryInfo::BatteryInfo(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Battery& batteryController)
|
BatteryInfo::BatteryInfo(const Pinetime::Controllers::Battery& batteryController) : batteryController {batteryController} {
|
||||||
: batteryController {batteryController} {
|
|
||||||
|
|
||||||
batteryPercent = batteryController.PercentRemaining();
|
batteryPercent = batteryController.PercentRemaining();
|
||||||
batteryVoltage = batteryController.Voltage();
|
batteryVoltage = batteryController.Voltage();
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class BatteryInfo : public Screen {
|
class BatteryInfo : public Screen {
|
||||||
public:
|
public:
|
||||||
BatteryInfo(DisplayApp* app, const Pinetime::Controllers::Battery& batteryController);
|
BatteryInfo(const Pinetime::Controllers::Battery& batteryController);
|
||||||
~BatteryInfo() override;
|
~BatteryInfo() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -13,7 +13,6 @@ namespace {
|
||||||
|
|
||||||
CheckboxList::CheckboxList(const uint8_t screenID,
|
CheckboxList::CheckboxList(const uint8_t screenID,
|
||||||
const uint8_t numScreens,
|
const uint8_t numScreens,
|
||||||
DisplayApp* app,
|
|
||||||
const char* optionsTitle,
|
const char* optionsTitle,
|
||||||
const char* optionsSymbol,
|
const char* optionsSymbol,
|
||||||
uint32_t originalValue,
|
uint32_t originalValue,
|
||||||
|
|
|
@ -23,7 +23,6 @@ namespace Pinetime {
|
||||||
|
|
||||||
CheckboxList(const uint8_t screenID,
|
CheckboxList(const uint8_t screenID,
|
||||||
const uint8_t numScreens,
|
const uint8_t numScreens,
|
||||||
DisplayApp* app,
|
|
||||||
const char* optionsTitle,
|
const char* optionsTitle,
|
||||||
const char* optionsSymbol,
|
const char* optionsSymbol,
|
||||||
uint32_t originalValue,
|
uint32_t originalValue,
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
Clock::Clock(DisplayApp* app,
|
Clock::Clock(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
@ -26,8 +25,7 @@ Clock::Clock(DisplayApp* app,
|
||||||
Controllers::HeartRateController& heartRateController,
|
Controllers::HeartRateController& heartRateController,
|
||||||
Controllers::MotionController& motionController,
|
Controllers::MotionController& motionController,
|
||||||
Controllers::FS& filesystem)
|
Controllers::FS& filesystem)
|
||||||
: app {app},
|
: dateTimeController {dateTimeController},
|
||||||
dateTimeController {dateTimeController},
|
|
||||||
batteryController {batteryController},
|
batteryController {batteryController},
|
||||||
bleController {bleController},
|
bleController {bleController},
|
||||||
notificationManager {notificationManager},
|
notificationManager {notificationManager},
|
||||||
|
@ -74,8 +72,7 @@ bool Clock::OnButtonPushed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
|
std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
|
||||||
return std::make_unique<Screens::WatchFaceDigital>(app,
|
return std::make_unique<Screens::WatchFaceDigital>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -85,8 +82,7 @@ std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
|
std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
|
||||||
return std::make_unique<Screens::WatchFaceAnalog>(app,
|
return std::make_unique<Screens::WatchFaceAnalog>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -94,8 +90,7 @@ std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
|
std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
|
||||||
return std::make_unique<Screens::WatchFacePineTimeStyle>(app,
|
return std::make_unique<Screens::WatchFacePineTimeStyle>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -104,8 +99,7 @@ std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() {
|
std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() {
|
||||||
return std::make_unique<Screens::WatchFaceTerminal>(app,
|
return std::make_unique<Screens::WatchFaceTerminal>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -115,8 +109,7 @@ std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
|
std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
|
||||||
return std::make_unique<Screens::WatchFaceInfineat>(app,
|
return std::make_unique<Screens::WatchFaceInfineat>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
@ -126,8 +119,7 @@ std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> Clock::WatchFaceCasioStyleG7710() {
|
std::unique_ptr<Screen> Clock::WatchFaceCasioStyleG7710() {
|
||||||
return std::make_unique<Screens::WatchFaceCasioStyleG7710>(app,
|
return std::make_unique<Screens::WatchFaceCasioStyleG7710>(dateTimeController,
|
||||||
dateTimeController,
|
|
||||||
batteryController,
|
batteryController,
|
||||||
bleController,
|
bleController,
|
||||||
notificationManager,
|
notificationManager,
|
||||||
|
|
|
@ -21,8 +21,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Clock : public Screen {
|
class Clock : public Screen {
|
||||||
public:
|
public:
|
||||||
Clock(DisplayApp* app,
|
Clock(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
@ -36,7 +35,6 @@ namespace Pinetime {
|
||||||
bool OnButtonPushed() override;
|
bool OnButtonPushed() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DisplayApp* app;
|
|
||||||
Controllers::DateTime& dateTimeController;
|
Controllers::DateTime& dateTimeController;
|
||||||
const Controllers::Battery& batteryController;
|
const Controllers::Battery& batteryController;
|
||||||
const Controllers::Ble& bleController;
|
const Controllers::Ble& bleController;
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) {
|
Error::Error(System::BootErrors error) {
|
||||||
|
|
||||||
lv_obj_t* warningLabel = lv_label_create(lv_scr_act(), nullptr);
|
lv_obj_t* warningLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_color(warningLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
|
lv_obj_set_style_local_text_color(warningLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Error : public Screen {
|
class Error : public Screen {
|
||||||
public:
|
public:
|
||||||
Error(DisplayApp* app, System::BootErrors error);
|
Error(System::BootErrors error);
|
||||||
~Error() override;
|
~Error() override;
|
||||||
|
|
||||||
void ButtonEventHandler();
|
void ButtonEventHandler();
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Ble& bleController)
|
FirmwareUpdate::FirmwareUpdate(const Pinetime::Controllers::Ble& bleController) : bleController {bleController} {
|
||||||
: bleController {bleController} {
|
|
||||||
|
|
||||||
titleLabel = lv_label_create(lv_scr_act(), nullptr);
|
titleLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_label_set_text_static(titleLabel, "Firmware update");
|
lv_label_set_text_static(titleLabel, "Firmware update");
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class FirmwareUpdate : public Screen {
|
class FirmwareUpdate : public Screen {
|
||||||
public:
|
public:
|
||||||
FirmwareUpdate(DisplayApp* app, const Pinetime::Controllers::Ble& bleController);
|
FirmwareUpdate(const Pinetime::Controllers::Ble& bleController);
|
||||||
~FirmwareUpdate() override;
|
~FirmwareUpdate() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -14,8 +14,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)
|
FirmwareValidation::FirmwareValidation(Pinetime::Controllers::FirmwareValidator& validator) : validator {validator} {
|
||||||
: validator {validator} {
|
|
||||||
labelVersion = lv_label_create(lv_scr_act(), nullptr);
|
labelVersion = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_label_set_text_fmt(labelVersion,
|
lv_label_set_text_fmt(labelVersion,
|
||||||
"Version : %lu.%lu.%lu\n"
|
"Version : %lu.%lu.%lu\n"
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class FirmwareValidation : public Screen {
|
class FirmwareValidation : public Screen {
|
||||||
public:
|
public:
|
||||||
FirmwareValidation(DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator);
|
FirmwareValidation(Pinetime::Controllers::FirmwareValidator& validator);
|
||||||
~FirmwareValidation() override;
|
~FirmwareValidation() override;
|
||||||
|
|
||||||
void OnButtonEvent(lv_obj_t* object, lv_event_t event);
|
void OnButtonEvent(lv_obj_t* object, lv_event_t event);
|
||||||
|
|
|
@ -14,9 +14,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlashLight::FlashLight(Pinetime::Applications::DisplayApp* app,
|
FlashLight::FlashLight(System::SystemTask& systemTask, Controllers::BrightnessController& brightnessController)
|
||||||
System::SystemTask& systemTask,
|
|
||||||
Controllers::BrightnessController& brightnessController)
|
|
||||||
: systemTask {systemTask}, brightnessController {brightnessController} {
|
: systemTask {systemTask}, brightnessController {brightnessController} {
|
||||||
|
|
||||||
brightnessController.Set(Controllers::BrightnessController::Levels::Low);
|
brightnessController.Set(Controllers::BrightnessController::Levels::Low);
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class FlashLight : public Screen {
|
class FlashLight : public Screen {
|
||||||
public:
|
public:
|
||||||
FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness);
|
FlashLight(System::SystemTask& systemTask, Controllers::BrightnessController& brightness);
|
||||||
~FlashLight() override;
|
~FlashLight() override;
|
||||||
|
|
||||||
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
|
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
|
||||||
|
|
|
@ -28,9 +28,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HeartRate::HeartRate(Pinetime::Applications::DisplayApp* app,
|
HeartRate::HeartRate(Controllers::HeartRateController& heartRateController, System::SystemTask& systemTask)
|
||||||
Controllers::HeartRateController& heartRateController,
|
|
||||||
System::SystemTask& systemTask)
|
|
||||||
: heartRateController {heartRateController}, systemTask {systemTask} {
|
: heartRateController {heartRateController}, systemTask {systemTask} {
|
||||||
bool isHrRunning = heartRateController.State() != Controllers::HeartRateController::States::Stopped;
|
bool isHrRunning = heartRateController.State() != Controllers::HeartRateController::States::Stopped;
|
||||||
label_hr = lv_label_create(lv_scr_act(), nullptr);
|
label_hr = lv_label_create(lv_scr_act(), nullptr);
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class HeartRate : public Screen {
|
class HeartRate : public Screen {
|
||||||
public:
|
public:
|
||||||
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
|
HeartRate(Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
|
||||||
~HeartRate() override;
|
~HeartRate() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app,
|
InfiniPaint::InfiniPaint(Pinetime::Components::LittleVgl& lvgl, Pinetime::Controllers::MotorController& motor)
|
||||||
Pinetime::Components::LittleVgl& lvgl,
|
|
||||||
Pinetime::Controllers::MotorController& motor)
|
|
||||||
: lvgl {lvgl}, motor {motor} {
|
: lvgl {lvgl}, motor {motor} {
|
||||||
std::fill(b, b + bufferSize, selectColor);
|
std::fill(b, b + bufferSize, selectColor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class InfiniPaint : public Screen {
|
class InfiniPaint : public Screen {
|
||||||
public:
|
public:
|
||||||
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
|
InfiniPaint(Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
|
||||||
|
|
||||||
~InfiniPaint() override;
|
~InfiniPaint() override;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
Label::Label(uint8_t screenID, uint8_t numScreens, lv_obj_t* labelText)
|
Label::Label(uint8_t screenID, uint8_t numScreens, lv_obj_t* labelText) : labelText {labelText}, pageIndicator(screenID, numScreens) {
|
||||||
: labelText {labelText}, pageIndicator(screenID, numScreens) {
|
|
||||||
|
|
||||||
pageIndicator.Create();
|
pageIndicator.Create();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask)
|
Metronome::Metronome(Controllers::MotorController& motorController, System::SystemTask& systemTask)
|
||||||
: motorController {motorController}, systemTask {systemTask} {
|
: motorController {motorController}, systemTask {systemTask} {
|
||||||
|
|
||||||
bpmArc = lv_arc_create(lv_scr_act(), nullptr);
|
bpmArc = lv_arc_create(lv_scr_act(), nullptr);
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class Metronome : public Screen {
|
class Metronome : public Screen {
|
||||||
public:
|
public:
|
||||||
Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask);
|
Metronome(Controllers::MotorController& motorController, System::SystemTask& systemTask);
|
||||||
~Metronome() override;
|
~Metronome() override;
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
void OnEvent(lv_obj_t* obj, lv_event_t event);
|
void OnEvent(lv_obj_t* obj, lv_event_t event);
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
Motion::Motion(Pinetime::Applications::DisplayApp* app, Controllers::MotionController& motionController)
|
Motion::Motion(Controllers::MotionController& motionController) : motionController {motionController} {
|
||||||
: motionController {motionController} {
|
|
||||||
chart = lv_chart_create(lv_scr_act(), nullptr);
|
chart = lv_chart_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_size(chart, 240, 240);
|
lv_obj_set_size(chart, 240, 240);
|
||||||
lv_obj_align(chart, nullptr, LV_ALIGN_IN_TOP_MID, 0, 0);
|
lv_obj_align(chart, nullptr, LV_ALIGN_IN_TOP_MID, 0, 0);
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class Motion : public Screen {
|
class Motion : public Screen {
|
||||||
public:
|
public:
|
||||||
Motion(DisplayApp* app, Controllers::MotionController& motionController);
|
Motion(Controllers::MotionController& motionController);
|
||||||
~Motion() override;
|
~Motion() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -47,7 +47,7 @@ inline void lv_img_set_src_arr(lv_obj_t* img, const lv_img_dsc_t* src_img) {
|
||||||
*
|
*
|
||||||
* TODO: Investigate Apple Media Service and AVRCPv1.6 support for seamless integration
|
* TODO: Investigate Apple Media Service and AVRCPv1.6 support for seamless integration
|
||||||
*/
|
*/
|
||||||
Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::MusicService& music) : musicService(music) {
|
Music::Music(Pinetime::Controllers::MusicService& music) : musicService(music) {
|
||||||
lv_obj_t* label;
|
lv_obj_t* label;
|
||||||
|
|
||||||
lv_style_init(&btn_style);
|
lv_style_init(&btn_style);
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Music : public Screen {
|
class Music : public Screen {
|
||||||
public:
|
public:
|
||||||
Music(DisplayApp* app, Pinetime::Controllers::MusicService& music);
|
Music(Pinetime::Controllers::MusicService& music);
|
||||||
|
|
||||||
~Music() override;
|
~Music() override;
|
||||||
|
|
||||||
|
|
|
@ -129,8 +129,7 @@ namespace {
|
||||||
* Navigation watchapp
|
* Navigation watchapp
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::NavigationService& nav)
|
Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navService(nav) {
|
||||||
: navService(nav) {
|
|
||||||
|
|
||||||
imgFlag = lv_label_create(lv_scr_act(), nullptr);
|
imgFlag = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_font(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_navi_80);
|
lv_obj_set_style_local_text_font(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_navi_80);
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Navigation : public Screen {
|
class Navigation : public Screen {
|
||||||
public:
|
public:
|
||||||
Navigation(DisplayApp* app, Pinetime::Controllers::NavigationService& nav);
|
Navigation(Pinetime::Controllers::NavigationService& nav);
|
||||||
~Navigation() override;
|
~Navigation() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} {
|
Paddle::Paddle(Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} {
|
||||||
background = lv_obj_create(lv_scr_act(), nullptr);
|
background = lv_obj_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_size(background, LV_HOR_RES + 1, LV_VER_RES);
|
lv_obj_set_size(background, LV_HOR_RES + 1, LV_VER_RES);
|
||||||
lv_obj_set_pos(background, -1, 0);
|
lv_obj_set_pos(background, -1, 0);
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class Paddle : public Screen {
|
class Paddle : public Screen {
|
||||||
public:
|
public:
|
||||||
Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
|
Paddle(Pinetime::Components::LittleVgl& lvgl);
|
||||||
~Paddle() override;
|
~Paddle() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) {
|
PassKey::PassKey(uint32_t key) {
|
||||||
passkeyLabel = lv_label_create(lv_scr_act(), nullptr);
|
passkeyLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
|
lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
|
||||||
lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class PassKey : public Screen {
|
class PassKey : public Screen {
|
||||||
public:
|
public:
|
||||||
PassKey(DisplayApp* app, uint32_t key);
|
explicit PassKey(uint32_t key);
|
||||||
~PassKey() override;
|
~PassKey() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -10,9 +10,7 @@ static void lap_event_handler(lv_obj_t* obj, lv_event_t event) {
|
||||||
steps->lapBtnEventHandler(event);
|
steps->lapBtnEventHandler(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
Steps::Steps(Pinetime::Applications::DisplayApp* app,
|
Steps::Steps(Controllers::MotionController& motionController, Controllers::Settings& settingsController)
|
||||||
Controllers::MotionController& motionController,
|
|
||||||
Controllers::Settings& settingsController)
|
|
||||||
: motionController {motionController}, settingsController {settingsController} {
|
: motionController {motionController}, settingsController {settingsController} {
|
||||||
|
|
||||||
stepsArc = lv_arc_create(lv_scr_act(), nullptr);
|
stepsArc = lv_arc_create(lv_scr_act(), nullptr);
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class Steps : public Screen {
|
class Steps : public Screen {
|
||||||
public:
|
public:
|
||||||
Steps(DisplayApp* app, Controllers::MotionController& motionController, Controllers::Settings& settingsController);
|
Steps(Controllers::MotionController& motionController, Controllers::Settings& settingsController);
|
||||||
~Steps() override;
|
~Steps() override;
|
||||||
|
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace {
|
||||||
constexpr TickType_t blinkInterval = pdMS_TO_TICKS(1000);
|
constexpr TickType_t blinkInterval = pdMS_TO_TICKS(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask) : systemTask {systemTask} {
|
StopWatch::StopWatch(System::SystemTask& systemTask) : systemTask {systemTask} {
|
||||||
static constexpr uint8_t btnWidth = 115;
|
static constexpr uint8_t btnWidth = 115;
|
||||||
static constexpr uint8_t btnHeight = 80;
|
static constexpr uint8_t btnHeight = 80;
|
||||||
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);
|
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace Pinetime::Applications::Screens {
|
||||||
|
|
||||||
class StopWatch : public Screen {
|
class StopWatch : public Screen {
|
||||||
public:
|
public:
|
||||||
StopWatch(DisplayApp* app, System::SystemTask& systemTask);
|
explicit StopWatch(System::SystemTask& systemTask);
|
||||||
~StopWatch() override;
|
~StopWatch() override;
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
|
|
||||||
|
|
|
@ -32,10 +32,7 @@ Tile::Tile(uint8_t screenID,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::DateTime& dateTimeController,
|
Controllers::DateTime& dateTimeController,
|
||||||
std::array<Applications, 6>& applications)
|
std::array<Applications, 6>& applications)
|
||||||
: app {app},
|
: app {app}, dateTimeController {dateTimeController}, pageIndicator(screenID, numScreens), statusIcons(batteryController, bleController) {
|
||||||
dateTimeController {dateTimeController},
|
|
||||||
pageIndicator(screenID, numScreens),
|
|
||||||
statusIcons(batteryController, bleController) {
|
|
||||||
|
|
||||||
settingsController.SetAppMenu(screenID);
|
settingsController.SetAppMenu(screenID);
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ static void btnEventHandler(lv_obj_t* obj, lv_event_t event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) : timerController {timerController} {
|
Timer::Timer(Controllers::TimerController& timerController) : timerController {timerController} {
|
||||||
|
|
||||||
lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr);
|
lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr);
|
||||||
lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76);
|
lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace Pinetime::Applications::Screens {
|
namespace Pinetime::Applications::Screens {
|
||||||
class Timer : public Screen {
|
class Timer : public Screen {
|
||||||
public:
|
public:
|
||||||
Timer(DisplayApp* app, Controllers::TimerController& timerController);
|
Timer(Controllers::TimerController& timerController);
|
||||||
~Timer() override;
|
~Timer() override;
|
||||||
void Refresh() override;
|
void Refresh() override;
|
||||||
void Reset();
|
void Reset();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
Twos::Twos(Pinetime::Applications::DisplayApp* app) {
|
Twos::Twos() {
|
||||||
|
|
||||||
struct colorPair {
|
struct colorPair {
|
||||||
lv_color_t bg;
|
lv_color_t bg;
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class Twos : public Screen {
|
class Twos : public Screen {
|
||||||
public:
|
public:
|
||||||
Twos(DisplayApp* app);
|
Twos();
|
||||||
~Twos() override;
|
~Twos() override;
|
||||||
|
|
||||||
bool OnTouchEvent(TouchEvents event) override;
|
bool OnTouchEvent(TouchEvents event) override;
|
||||||
|
|
|
@ -43,8 +43,7 @@ namespace {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app,
|
WatchFaceAnalog::WatchFaceAnalog(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -24,8 +24,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WatchFaceAnalog : public Screen {
|
class WatchFaceAnalog : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFaceAnalog(DisplayApp* app,
|
WatchFaceAnalog(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -15,8 +15,7 @@
|
||||||
#include "components/settings/Settings.h"
|
#include "components/settings/Settings.h"
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(DisplayApp* app,
|
WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificatioManager,
|
Controllers::NotificationManager& notificatioManager,
|
||||||
|
|
|
@ -24,8 +24,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WatchFaceCasioStyleG7710 : public Screen {
|
class WatchFaceCasioStyleG7710 : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFaceCasioStyleG7710(DisplayApp* app,
|
WatchFaceCasioStyleG7710(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificatioManager,
|
Controllers::NotificationManager& notificatioManager,
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
|
WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -24,8 +24,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WatchFaceDigital : public Screen {
|
class WatchFaceDigital : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFaceDigital(DisplayApp* app,
|
WatchFaceDigital(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -20,8 +20,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
|
WatchFaceInfineat::WatchFaceInfineat(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -21,8 +21,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WatchFaceInfineat : public Screen {
|
class WatchFaceInfineat : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFaceInfineat(DisplayApp* app,
|
WatchFaceInfineat(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -44,8 +44,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
|
WatchFacePineTimeStyle::WatchFacePineTimeStyle(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -24,8 +24,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class WatchFacePineTimeStyle : public Screen {
|
class WatchFacePineTimeStyle : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFacePineTimeStyle(DisplayApp* app,
|
WatchFacePineTimeStyle(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
|
|
||||||
using namespace Pinetime::Applications::Screens;
|
using namespace Pinetime::Applications::Screens;
|
||||||
|
|
||||||
WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
|
WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -22,8 +22,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class WatchFaceTerminal : public Screen {
|
class WatchFaceTerminal : public Screen {
|
||||||
public:
|
public:
|
||||||
WatchFaceTerminal(DisplayApp* app,
|
WatchFaceTerminal(Controllers::DateTime& dateTimeController,
|
||||||
Controllers::DateTime& dateTimeController,
|
|
||||||
const Controllers::Battery& batteryController,
|
const Controllers::Battery& batteryController,
|
||||||
const Controllers::Ble& bleController,
|
const Controllers::Ble& bleController,
|
||||||
Controllers::NotificationManager& notificationManager,
|
Controllers::NotificationManager& notificationManager,
|
||||||
|
|
|
@ -39,7 +39,6 @@ SettingBluetooth::SettingBluetooth(Pinetime::Applications::DisplayApp* app, Pine
|
||||||
checkboxList(
|
checkboxList(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
app,
|
|
||||||
"Bluetooth",
|
"Bluetooth",
|
||||||
Symbols::bluetooth,
|
Symbols::bluetooth,
|
||||||
settingsController.GetBleRadioEnabled() ? 0 : 1,
|
settingsController.GetBleRadioEnabled() ? 0 : 1,
|
||||||
|
|
|
@ -44,11 +44,10 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingChimes::SettingChimes(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
|
SettingChimes::SettingChimes(Pinetime::Controllers::Settings& settingsController)
|
||||||
: checkboxList(
|
: checkboxList(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
app,
|
|
||||||
"Chimes",
|
"Chimes",
|
||||||
Symbols::clock,
|
Symbols::clock,
|
||||||
GetDefaultOption(settingsController.GetChimeOption()),
|
GetDefaultOption(settingsController.GetChimeOption()),
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingChimes : public Screen {
|
class SettingChimes : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
SettingChimes(Pinetime::Controllers::Settings& settingsController);
|
||||||
~SettingChimes() override;
|
~SettingChimes() override;
|
||||||
|
|
||||||
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
||||||
|
|
|
@ -45,8 +45,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSetDate::SettingSetDate(Pinetime::Applications::DisplayApp* app,
|
SettingSetDate::SettingSetDate(Pinetime::Controllers::DateTime& dateTimeController,
|
||||||
Pinetime::Controllers::DateTime& dateTimeController,
|
|
||||||
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
|
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
|
||||||
: dateTimeController {dateTimeController}, settingSetDateTime {settingSetDateTime} {
|
: dateTimeController {dateTimeController}, settingSetDateTime {settingSetDateTime} {
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class SettingSetDate : public Screen {
|
class SettingSetDate : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingSetDate(DisplayApp* app,
|
SettingSetDate(Pinetime::Controllers::DateTime& dateTimeController,
|
||||||
Pinetime::Controllers::DateTime& dateTimeController,
|
|
||||||
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
|
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
|
||||||
~SettingSetDate() override;
|
~SettingSetDate() override;
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,13 @@ SettingSetDateTime::SettingSetDateTime(Pinetime::Applications::DisplayApp* app,
|
||||||
std::unique_ptr<Screen> SettingSetDateTime::screenSetDate() {
|
std::unique_ptr<Screen> SettingSetDateTime::screenSetDate() {
|
||||||
Widgets::DotIndicator dotIndicator(0, 2);
|
Widgets::DotIndicator dotIndicator(0, 2);
|
||||||
dotIndicator.Create();
|
dotIndicator.Create();
|
||||||
return std::make_unique<Screens::SettingSetDate>(app, dateTimeController, *this);
|
return std::make_unique<Screens::SettingSetDate>(dateTimeController, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Screen> SettingSetDateTime::screenSetTime() {
|
std::unique_ptr<Screen> SettingSetDateTime::screenSetTime() {
|
||||||
Widgets::DotIndicator dotIndicator(1, 2);
|
Widgets::DotIndicator dotIndicator(1, 2);
|
||||||
dotIndicator.Create();
|
dotIndicator.Create();
|
||||||
return std::make_unique<Screens::SettingSetTime>(app, dateTimeController, settingsController, *this);
|
return std::make_unique<Screens::SettingSetTime>(dateTimeController, settingsController, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSetDateTime::~SettingSetDateTime() {
|
SettingSetDateTime::~SettingSetDateTime() {
|
||||||
|
|
|
@ -25,8 +25,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSetTime::SettingSetTime(Pinetime::Applications::DisplayApp* app,
|
SettingSetTime::SettingSetTime(Pinetime::Controllers::DateTime& dateTimeController,
|
||||||
Pinetime::Controllers::DateTime& dateTimeController,
|
|
||||||
Pinetime::Controllers::Settings& settingsController,
|
Pinetime::Controllers::Settings& settingsController,
|
||||||
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
|
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
|
||||||
: dateTimeController {dateTimeController}, settingsController {settingsController}, settingSetDateTime {settingSetDateTime} {
|
: dateTimeController {dateTimeController}, settingsController {settingsController}, settingSetDateTime {settingSetDateTime} {
|
||||||
|
|
|
@ -14,8 +14,7 @@ namespace Pinetime {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
class SettingSetTime : public Screen {
|
class SettingSetTime : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingSetTime(DisplayApp* app,
|
SettingSetTime(Pinetime::Controllers::DateTime& dateTimeController,
|
||||||
Pinetime::Controllers::DateTime& dateTimeController,
|
|
||||||
Pinetime::Controllers::Settings& settingsController,
|
Pinetime::Controllers::Settings& settingsController,
|
||||||
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
|
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
|
||||||
~SettingSetTime() override;
|
~SettingSetTime() override;
|
||||||
|
|
|
@ -14,8 +14,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app,
|
SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsController,
|
||||||
Controllers::Settings& settingsController,
|
|
||||||
Controllers::MotionController& motionController,
|
Controllers::MotionController& motionController,
|
||||||
System::SystemTask& systemTask)
|
System::SystemTask& systemTask)
|
||||||
: settingsController {settingsController}, motionController {motionController}, systemTask {systemTask} {
|
: settingsController {settingsController}, motionController {motionController}, systemTask {systemTask} {
|
||||||
|
|
|
@ -14,8 +14,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingShakeThreshold : public Screen {
|
class SettingShakeThreshold : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingShakeThreshold(DisplayApp* app,
|
SettingShakeThreshold(Pinetime::Controllers::Settings& settingsController,
|
||||||
Pinetime::Controllers::Settings& settingsController,
|
|
||||||
Controllers::MotionController& motionController,
|
Controllers::MotionController& motionController,
|
||||||
System::SystemTask& systemTask);
|
System::SystemTask& systemTask);
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingSteps::SettingSteps(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
|
SettingSteps::SettingSteps(Pinetime::Controllers::Settings& settingsController) : settingsController {settingsController} {
|
||||||
: settingsController {settingsController} {
|
|
||||||
|
|
||||||
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
|
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingSteps : public Screen {
|
class SettingSteps : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingSteps(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
SettingSteps(Pinetime::Controllers::Settings& settingsController);
|
||||||
~SettingSteps() override;
|
~SettingSteps() override;
|
||||||
|
|
||||||
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
||||||
|
|
|
@ -42,11 +42,10 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingTimeFormat::SettingTimeFormat(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
|
SettingTimeFormat::SettingTimeFormat(Pinetime::Controllers::Settings& settingsController)
|
||||||
: checkboxList(
|
: checkboxList(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
app,
|
|
||||||
"Time format",
|
"Time format",
|
||||||
Symbols::clock,
|
Symbols::clock,
|
||||||
GetDefaultOption(settingsController.GetClockType()),
|
GetDefaultOption(settingsController.GetClockType()),
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingTimeFormat : public Screen {
|
class SettingTimeFormat : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingTimeFormat(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
SettingTimeFormat(Pinetime::Controllers::Settings& settingsController);
|
||||||
~SettingTimeFormat() override;
|
~SettingTimeFormat() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -19,8 +19,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SettingWakeUp::SettingWakeUp(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
|
SettingWakeUp::SettingWakeUp(Pinetime::Controllers::Settings& settingsController) : settingsController {settingsController} {
|
||||||
: settingsController {settingsController} {
|
|
||||||
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
|
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
|
||||||
|
|
||||||
lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
|
lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Pinetime {
|
||||||
|
|
||||||
class SettingWakeUp : public Screen {
|
class SettingWakeUp : public Screen {
|
||||||
public:
|
public:
|
||||||
SettingWakeUp(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
SettingWakeUp(Pinetime::Controllers::Settings& settingsController);
|
||||||
~SettingWakeUp() override;
|
~SettingWakeUp() override;
|
||||||
|
|
||||||
void UpdateSelected(lv_obj_t* object);
|
void UpdateSelected(lv_obj_t* object);
|
||||||
|
|
|
@ -45,7 +45,6 @@ std::unique_ptr<Screen> SettingWatchFace::CreateScreen(unsigned int screenNum) c
|
||||||
return std::make_unique<Screens::CheckboxList>(
|
return std::make_unique<Screens::CheckboxList>(
|
||||||
screenNum,
|
screenNum,
|
||||||
nScreens,
|
nScreens,
|
||||||
app,
|
|
||||||
title,
|
title,
|
||||||
symbol,
|
symbol,
|
||||||
settingsController.GetClockFace(),
|
settingsController.GetClockFace(),
|
||||||
|
|
Loading…
Reference in a new issue