platform: arduino: u8display: delete task on stop

This commit is contained in:
Torrie Fischer 2023-02-19 18:38:48 +01:00
parent 22cf849e15
commit 2a0d72f0a1

View File

@ -18,6 +18,7 @@ class U8Display : public Task {
}; };
void onStart() { void onStart() {
Log.trace("display: starting redraw thread");
xTaskCreatePinnedToCore( xTaskCreatePinnedToCore(
&U8Display::redrawTask, &U8Display::redrawTask,
name, 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) { void handleEvent(const InputEvent& evt) {
m_lastEvent = evt; m_lastEvent = evt;
if (m_state == Idle) { if (m_state == Idle) {