mirror of
https://github.com/meshtastic/firmware.git
synced 2026-11-07 23:04:49 -05:00
BookReader
This commit is contained in:
1 parent
04cb888511
commit
60f7b8be7e
26 files changed
+10613
-175
No files matched your search
@@ -129,9 +129,30 @@ bool TouchScreenImpl1::fastTapModeEnabled() const
|
||||
|
||||
bool TouchScreenImpl1::longPressEnabled() const
|
||||
{
|
||||
#ifdef MESHTASTIC_INCLUDE_INKHUD_BOOKREADER
|
||||
return !fastTapModeEnabled() && !swipeFriendlyModeEnabled();
|
||||
#else
|
||||
return !fastTapModeEnabled();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MESHTASTIC_INCLUDE_INKHUD_BOOKREADER
|
||||
bool TouchScreenImpl1::swipeFriendlyModeEnabled() const
|
||||
{
|
||||
#ifdef MESHTASTIC_INCLUDE_INKHUD
|
||||
auto *inkhud = NicheGraphics::InkHUD::InkHUD::getInstance();
|
||||
if (inkhud) {
|
||||
for (auto *sa : inkhud->systemApplets)
|
||||
if (sa && sa->handleInput)
|
||||
return false;
|
||||
auto *applet = inkhud->getActiveApplet();
|
||||
return applet && applet->isForeground() && applet->name && strcmp(applet->name, "Book Reader") == 0;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief forward touchscreen event
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user