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:
Jakub
2026-10-12 19:30:46 +02:00
co-authored by Claude Opus 5.5
parent 2b9e013071
commit ec42a74ab6
5 changed files with 85 additions and 2 deletions
+5
View File
@@ -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
}