Merge pull request #79 from minacode/watch-face-enum

Support for PR: https://github.com/InfiniTimeOrg/InfiniTime/pull/1339
main
NeroBurner 2023-05-01 21:15:43 +07:00 committed by GitHub
commit 22c02bace6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

@ -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();

@ -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) {