From 2a0d72f0a1ab3578de06a37c78ab370e82fc9114 Mon Sep 17 00:00:00 2001 From: Torrie Fischer Date: Sun, 19 Feb 2023 18:38:48 +0100 Subject: [PATCH] platform: arduino: u8display: delete task on stop --- src/platform/arduino/U8Display.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/arduino/U8Display.cpp b/src/platform/arduino/U8Display.cpp index b29d465..adaea3e 100644 --- a/src/platform/arduino/U8Display.cpp +++ b/src/platform/arduino/U8Display.cpp @@ -18,6 +18,7 @@ class U8Display : public Task { }; void onStart() { + Log.trace("display: starting redraw thread"); xTaskCreatePinnedToCore( &U8Display::redrawTask, name, @@ -28,6 +29,11 @@ class U8Display : public Task { ); } + void onStop() { + Log.trace("display: stopping redraw thread"); + vTaskDelete(m_renderTask); + } + void handleEvent(const InputEvent& evt) { m_lastEvent = evt; if (m_state == Idle) {