Open Sauce Demo: custom applet selection (#7219)

This commit is contained in:
todd-herbert
2025-07-05 01:02:12 +12:00
committed by vidplace7
parent 6165449cee
commit 856ab293dc
10 changed files with 117 additions and 87 deletions

View File

@@ -62,10 +62,11 @@ void setupNicheGraphics()
InkHUD::Applet::fontSmall = FREESANS_6PT_WIN1252;
// Customize default settings
inkhud->persistence->settings.userTiles.maxCount = 2; // Two applets side-by-side
inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise
inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery
inkhud->persistence->settings.optionalMenuItems.backlight = true; // Until proves capacitive button works by touching it
inkhud->persistence->settings.userTiles.maxCount = 2; // Two applets side-by-side
inkhud->persistence->settings.rotation = 3; // 270 degrees clockwise
inkhud->persistence->settings.optionalFeatures.batteryIcon = true; // Device definitely has a battery
inkhud->persistence->settings.optionalMenuItems.backlight = true; // Until proves capacitive button works by touching it
inkhud->persistence->settings.optionalFeatures.notifications = false; // No notifications. Busy mesh.
// Setup backlight controller
// Note: AUX button attached further down
@@ -73,14 +74,16 @@ void setupNicheGraphics()
backlight->setPin(PIN_EINK_EN);
// Pick applets
// Note: order of applets determines priority of "auto-show" feature
inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet, true, true); // Activated, autoshown
inkhud->addApplet("DMs", new InkHUD::DMApplet); // -
inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0)); // -
inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1)); // -
inkhud->addApplet("Positions", new InkHUD::PositionsApplet, true); // Activated
inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet); // -
inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 0); // Activated, no autoshow, default on tile 0
// Custom selection for OpenSauce
inkhud->addApplet("Channel 0", new InkHUD::ThreadedMessageApplet(0), true, false, 0); // Default tile 0
inkhud->addApplet("Channel 1", new InkHUD::ThreadedMessageApplet(1), true);
inkhud->addApplet("Channel 2", new InkHUD::ThreadedMessageApplet(2), true);
inkhud->addApplet("DMs", new InkHUD::DMApplet, true, true); // Autoshown if new message
inkhud->addApplet("Heard", new InkHUD::HeardApplet, true, false, 1); // Default tile 1
// Disabled by default
inkhud->addApplet("All Messages", new InkHUD::AllMessageApplet);
inkhud->addApplet("Positions", new InkHUD::PositionsApplet);
inkhud->addApplet("Recents List", new InkHUD::RecentsListApplet);
// Start running InkHUD
inkhud->begin();