mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-11-21 22:47:05 +00:00
companion: enable e-ink refresh loop only with EINK_REFRESH_LOOP
Only builds that define EINK_REFRESH_LOOP install the busy hook; for now the T-Echo companion BLE/USB envs.
This commit is contained in:
1 parent
05423e516a
commit
1df6262d58
2 files changed
+6
-2
No files matched your search
@@ -132,7 +132,7 @@ void halt() {
|
||||
bool wifi_enabled = false; // set at boot from prefs; false also when the effective SSID is blank
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
#if defined(DISPLAY_CLASS) && defined(EINK_REFRESH_LOOP)
|
||||
static void loopDuringDisplayRefresh();
|
||||
#endif
|
||||
|
||||
@@ -288,7 +288,9 @@ void setup() {
|
||||
#ifdef DISPLAY_CLASS
|
||||
ui_task.begin(disp, &sensors, the_mesh.getNodePrefs()); // still want to pass this in as dependency, as prefs might be moved
|
||||
the_mesh.setListener(&ui_task);
|
||||
#ifdef EINK_REFRESH_LOOP
|
||||
if (disp != NULL) disp->setBusyHook(loopDuringDisplayRefresh);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
board.onBootComplete();
|
||||
@@ -302,7 +304,7 @@ static void loopCore() {
|
||||
sensors.loop();
|
||||
}
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
#if defined(DISPLAY_CLASS) && defined(EINK_REFRESH_LOOP)
|
||||
// Runs from inside the e-ink busy wait, so radio/BLE/sensors keep going during a panel refresh.
|
||||
// Must not touch the display: UI listener callbacks only update state and schedule the next frame.
|
||||
static void loopDuringDisplayRefresh() {
|
||||
|
||||
@@ -93,6 +93,7 @@ build_flags =
|
||||
${LilyGo_T-Echo.build_flags}
|
||||
-I src/helpers/ui
|
||||
-I examples/companion_radio/ui-new
|
||||
-D EINK_REFRESH_LOOP
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D QSPIFLASH=1
|
||||
@@ -120,6 +121,7 @@ build_flags =
|
||||
${LilyGo_T-Echo.build_flags}
|
||||
-I src/helpers/ui
|
||||
-I examples/companion_radio/ui-new
|
||||
-D EINK_REFRESH_LOOP
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
|
||||
Reference in new issue
Block a user