mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-22 09:31:10 +00:00
refactor: don't init system applets using onActivate
System applets cannot be deactivated, so we will avoid using onActivate / onDeactivate methods entirely.
This commit is contained in:
parent
f1f9aac134
commit
7c327ce0e4
@ -27,8 +27,6 @@ InkHUD::MenuApplet::MenuApplet() : concurrency::OSThread("MenuApplet")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InkHUD::MenuApplet::onActivate() {}
|
|
||||||
|
|
||||||
void InkHUD::MenuApplet::onForeground()
|
void InkHUD::MenuApplet::onForeground()
|
||||||
{
|
{
|
||||||
// We do need this before we render, but we can optimize by just calculating it once now
|
// We do need this before we render, but we can optimize by just calculating it once now
|
||||||
|
@ -21,7 +21,6 @@ class MenuApplet : public SystemApplet, public concurrency::OSThread
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MenuApplet();
|
MenuApplet();
|
||||||
void onActivate() override;
|
|
||||||
void onForeground() override;
|
void onForeground() override;
|
||||||
void onBackground() override;
|
void onBackground() override;
|
||||||
void onButtonShortPress() override;
|
void onButtonShortPress() override;
|
||||||
|
@ -207,8 +207,6 @@ void InkHUD::TipsApplet::onBackground()
|
|||||||
inkhud->forceUpdate(EInk::UpdateTypes::FULL);
|
inkhud->forceUpdate(EInk::UpdateTypes::FULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InkHUD::TipsApplet::onActivate() {}
|
|
||||||
|
|
||||||
// While our SystemApplet::handleInput flag is true
|
// While our SystemApplet::handleInput flag is true
|
||||||
void InkHUD::TipsApplet::onButtonShortPress()
|
void InkHUD::TipsApplet::onButtonShortPress()
|
||||||
{
|
{
|
||||||
|
@ -33,7 +33,6 @@ class TipsApplet : public SystemApplet
|
|||||||
TipsApplet();
|
TipsApplet();
|
||||||
|
|
||||||
void onRender() override;
|
void onRender() override;
|
||||||
void onActivate() override;
|
|
||||||
void onForeground() override;
|
void onForeground() override;
|
||||||
void onBackground() override;
|
void onBackground() override;
|
||||||
void onButtonShortPress() override;
|
void onButtonShortPress() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user