Re-order apps in application menu on 2 pages.
Add firmware validation app.
This commit is contained in:
parent
e6f5ab7b91
commit
41c36d3a42
5 changed files with 19 additions and 15 deletions
|
@ -2,6 +2,6 @@
|
|||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness, Music};
|
||||
enum class Apps {None, Launcher, Clock, SysInfo, Meter, Gauge, Brightness, Music, FirmwareValidation};
|
||||
}
|
||||
}
|
|
@ -190,6 +190,7 @@ void DisplayApp::RunningState() {
|
|||
case Apps::Gauge: currentScreen.reset(new Screens::Gauge(this)); break;
|
||||
case Apps::Brightness : currentScreen.reset(new Screens::Brightness(this, brightnessController)); break;
|
||||
case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break;
|
||||
case Apps::FirmwareValidation: currentScreen.reset(new Screens::FirmwareValidation(this, validator)); break;
|
||||
}
|
||||
nextApp = Apps::None;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ ApplicationList::ApplicationList(Pinetime::Applications::DisplayApp *app) :
|
|||
Screen(app),
|
||||
screens{app, {
|
||||
[this]() -> std::unique_ptr<Screen> { return CreateScreen1(); },
|
||||
//[this]() -> std::unique_ptr<Screen> { return CreateScreen2(); },
|
||||
[this]() -> std::unique_ptr<Screen> { return CreateScreen2(); },
|
||||
//[this]() -> std::unique_ptr<Screen> { return CreateScreen3(); }
|
||||
}
|
||||
} {}
|
||||
|
@ -39,13 +39,15 @@ bool ApplicationList::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
|||
|
||||
std::unique_ptr<Screen> ApplicationList::CreateScreen1() {
|
||||
std::array<Screens::Tile::Applications, 6> applications {
|
||||
{{Symbols::asterisk, Apps::Meter},
|
||||
{Symbols::tachometer, Apps::Gauge},
|
||||
{Symbols::clock, Apps::Clock},
|
||||
{{Symbols::clock, Apps::Clock},
|
||||
{Symbols::music, Apps::Music},
|
||||
{Symbols::sun, Apps::Brightness},
|
||||
{Symbols::list, Apps::SysInfo},
|
||||
{Symbols::sun, Apps::Brightness}
|
||||
{Symbols::check, Apps::FirmwareValidation},
|
||||
{Symbols::none, Apps::None}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
return std::unique_ptr<Screen>(new Screens::Tile(app, applications));
|
||||
|
@ -53,12 +55,12 @@ std::unique_ptr<Screen> ApplicationList::CreateScreen1() {
|
|||
|
||||
std::unique_ptr<Screen> ApplicationList::CreateScreen2() {
|
||||
std::array<Screens::Tile::Applications, 6> applications {
|
||||
{{"0", Apps::Meter},
|
||||
{"1", Apps::Gauge},
|
||||
{"2", Apps::Clock},
|
||||
{"3", Apps::Music},
|
||||
{"4", Apps::SysInfo},
|
||||
{"5", Apps::Brightness}
|
||||
{{Symbols::tachometer, Apps::Gauge},
|
||||
{Symbols::asterisk, Apps::Meter},
|
||||
{Symbols::none, Apps::None},
|
||||
{Symbols::none, Apps::None},
|
||||
{Symbols::none, Apps::None},
|
||||
{Symbols::none, Apps::None}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Pinetime {
|
|||
private:
|
||||
bool running = true;
|
||||
|
||||
ScreenList<1> screens;
|
||||
ScreenList<2> screens;
|
||||
std::unique_ptr<Screen> CreateScreen1();
|
||||
std::unique_ptr<Screen> CreateScreen2();
|
||||
std::unique_ptr<Screen> CreateScreen3();
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace Pinetime {
|
|||
namespace Applications {
|
||||
namespace Screens {
|
||||
namespace Symbols {
|
||||
static constexpr char* none = "";
|
||||
static constexpr char* batteryFull = "\xEF\x89\x80";
|
||||
static constexpr char* batteryEmpty = "\xEF\x89\x84";
|
||||
static constexpr char* batteryThreeQuarter = "\xEF\x89\x81";
|
||||
|
|
Loading…
Reference in a new issue