Merge pull request #79 from minacode/watch-face-enum
Support for PR: https://github.com/InfiniTimeOrg/InfiniTime/pull/1339
This commit is contained in:
commit
22c02bace6
|
@ -1 +1 @@
|
|||
Subproject commit 40f7e1c7be6882e01058b5ccf64d5005c6105346
|
||||
Subproject commit 020a7fd11d1b18fd7ac29ccc00b9c6f6e0cdb17b
|
|
@ -535,15 +535,15 @@ int command_settings(const std::string &program_name, const std::vector<std::str
|
|||
settingsController.Init();
|
||||
using namespace Pinetime::Controllers;
|
||||
{
|
||||
auto clockface = settingsController.GetClockFace();
|
||||
auto clockface = settingsController.GetWatchFace();
|
||||
auto clockface_str = [](auto val) {
|
||||
if (val == 0) return "Digital";
|
||||
if (val == 1) return "Analog";
|
||||
if (val == 2) return "PineTimeStyle";
|
||||
if (val == 3) return "Terminal";
|
||||
if (val == Pinetime::Applications::WatchFace::Digital) return "Digital";
|
||||
if (val == Pinetime::Applications::WatchFace::Analog) return "Analog";
|
||||
if (val == Pinetime::Applications::WatchFace::PineTimeStyle) return "PineTimeStyle";
|
||||
if (val == Pinetime::Applications::WatchFace::Terminal) return "Terminal";
|
||||
return "unknown";
|
||||
}(clockface);
|
||||
std::cout << "ClockFace: " << static_cast<int>(clockface) << " " << clockface_str << std::endl;
|
||||
std::cout << "ClockFace: " << static_cast<uint32_t>(clockface) << " " << clockface_str << std::endl;
|
||||
}
|
||||
{
|
||||
auto chimes = settingsController.GetChimeOption();
|
||||
|
|
6
main.cpp
6
main.cpp
|
@ -755,15 +755,15 @@ public:
|
|||
void switch_to_screen(uint8_t screen_idx)
|
||||
{
|
||||
if (screen_idx == 1) {
|
||||
settingsController.SetClockFace(0);
|
||||
settingsController.SetWatchFace(Pinetime::Applications::WatchFace::Digital);
|
||||
displayApp.StartApp(Pinetime::Applications::Apps::Clock, Pinetime::Applications::DisplayApp::FullRefreshDirections::None);
|
||||
}
|
||||
else if (screen_idx == 2) {
|
||||
settingsController.SetClockFace(1);
|
||||
settingsController.SetWatchFace(Pinetime::Applications::WatchFace::Analog);
|
||||
displayApp.StartApp(Pinetime::Applications::Apps::Clock, Pinetime::Applications::DisplayApp::FullRefreshDirections::None);
|
||||
}
|
||||
else if (screen_idx == 3) {
|
||||
settingsController.SetClockFace(2);
|
||||
settingsController.SetWatchFace(Pinetime::Applications::WatchFace::PineTimeStyle);
|
||||
displayApp.StartApp(Pinetime::Applications::Apps::Clock, Pinetime::Applications::DisplayApp::FullRefreshDirections::None);
|
||||
}
|
||||
else if (screen_idx == 4) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user