From c82c9adf321b6e653c8069758f226d931fc39d9f Mon Sep 17 00:00:00 2001 From: Mitchell M Date: Wed, 1 Apr 2026 15:55:23 -0500 Subject: [PATCH] cleanup expander --- drivers/expander.cpp | 49 ++++++------- include/blk_box_drivers/expander.hpp | 101 +++++++++++++++++++-------- 2 files changed, 92 insertions(+), 58 deletions(-) diff --git a/drivers/expander.cpp b/drivers/expander.cpp index 06b001b..67646db 100644 --- a/drivers/expander.cpp +++ b/drivers/expander.cpp @@ -157,8 +157,6 @@ static void expander_task(void *arg) { // Wait for interrupt notification (signal is sent when INT falls) ulTaskNotifyTake(pdTRUE, portMAX_DELAY); - // loop continues and will process events once INT goes low - printf("WAKE\n"); } } @@ -222,9 +220,7 @@ static void handle_button_switch_event(uint8_t event) { Switch sw = static_cast(number); SwitchFlip sw_flip = SwitchFlip(sw, pressed); - if (xQueueSendToBack(expander_peripheral_singleton.switch_flip_events, &sw_flip, 0) != pdTRUE) { - ESP_LOGE(TAG, "Failed to send switch flip event!"); - } + xQueueSendToBack(expander_peripheral_singleton.switch_flip_events, &sw_flip, 0); xSemaphoreTake(expander_peripheral_singleton.state_mutex, portMAX_DELAY); if (pressed) { // set @@ -238,16 +234,12 @@ static void handle_button_switch_event(uint8_t event) { // button Button button = static_cast