mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
perf: unused TinyUSB classes off on nRF52, SSD1306 sends only changed blocks, ESP32 loop yields when idle
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -381,6 +381,11 @@ void loop() {
|
||||
if (!the_mesh.hasPendingWork()) {
|
||||
#if defined(NRF52_PLATFORM)
|
||||
board.sleep(0); // nrf ignores seconds param, sleeps whenever possible
|
||||
#elif defined(ESP32) && !defined(UI_LOOP_IDLES)
|
||||
// Arduino's loop task never yields: without this it spins the CPU flat
|
||||
// out. One tick lets the idle task halt the core (WAITI) until the next
|
||||
// interrupt or tick -- radio, buttons and serial still get a pass a ms.
|
||||
vTaskDelay(1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
#include "../ui-core/UiCoreHost.h"
|
||||
#include "../ui-core/ScreenLock.h"
|
||||
|
||||
// loop() waits on its own until something is due (lvport::idle, woken by a
|
||||
// frame from the app): main.cpp adds no wait of its own.
|
||||
#define UI_LOOP_IDLES 1
|
||||
|
||||
class UiCore;
|
||||
class NearbyModel;
|
||||
struct UiEvent;
|
||||
|
||||
Reference in New Issue
Block a user