mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-21 09:13:42 +00:00
chore: update the example applets
This commit is contained in:
parent
7c327ce0e4
commit
ddb1f6f8b5
@ -8,7 +8,7 @@ using namespace NicheGraphics;
|
|||||||
// Our basic example doesn't do anything useful. It just passively prints some text.
|
// Our basic example doesn't do anything useful. It just passively prints some text.
|
||||||
void InkHUD::BasicExampleApplet::onRender()
|
void InkHUD::BasicExampleApplet::onRender()
|
||||||
{
|
{
|
||||||
print("Hello, World!");
|
printAt(0, 0, "Hello, World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -4,11 +4,12 @@
|
|||||||
|
|
||||||
using namespace NicheGraphics;
|
using namespace NicheGraphics;
|
||||||
|
|
||||||
// We configured MeshModule API to call this method when we receive a new text message
|
// We configured the Module API to call this method when we receive a new text message
|
||||||
ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp)
|
ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_MeshPacket &mp)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Abort if applet fully deactivated
|
// Abort if applet fully deactivated
|
||||||
|
// Don't waste time: we wouldn't be rendered anyway
|
||||||
if (!isActive())
|
if (!isActive())
|
||||||
return ProcessMessage::CONTINUE;
|
return ProcessMessage::CONTINUE;
|
||||||
|
|
||||||
@ -25,7 +26,7 @@ ProcessMessage InkHUD::NewMsgExampleApplet::handleReceived(const meshtastic_Mesh
|
|||||||
requestUpdate();
|
requestUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tell MeshModule API to continue informing other firmware components about this message
|
// Tell Module API to continue informing other firmware components about this message
|
||||||
// We're not the only component which is interested in new text messages
|
// We're not the only component which is interested in new text messages
|
||||||
return ProcessMessage::CONTINUE;
|
return ProcessMessage::CONTINUE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user