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