From 0ea3a0b4abcb5ec7909d26bf631157da1e5cdad7 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Thu, 16 Jun 2022 23:14:06 +0200 Subject: [PATCH] Only listen for buttons to prevent weird issues from occuring --- software/main/src/can.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/software/main/src/can.cpp b/software/main/src/can.cpp index d8a456c..77a6c1c 100644 --- a/software/main/src/can.cpp +++ b/software/main/src/can.cpp @@ -325,7 +325,8 @@ static void can_task(void* params) { read_can_msg(spi, MCP_READ_RX0, &id, &len, buf); } - static bool enabled = false; + // @TODO Set this to false again once source detections works + static bool enabled = true; switch (id) { case BUTTONS_ID: if (enabled) { @@ -426,9 +427,9 @@ void can::init() { write_id(*spi, MCP_RXM1SIDH, 0x3ff); ESP_LOGI(CAN_TAG, "Init filter"); - write_id(*spi, MCP_RXF0SIDH, RADIO_ID); - write_id(*spi, MCP_RXF1SIDH, VOLUME_ID); - write_id(*spi, MCP_RXF2SIDH, BUTTONS_ID); + write_id(*spi, MCP_RXF0SIDH, BUTTONS_ID); + /* write_id(*spi, MCP_RXF1SIDH, VOLUME_ID); */ + /* write_id(*spi, MCP_RXF2SIDH, RADIO_ID); */ ESP_LOGI(CAN_TAG, "Enter normal mode"); set_CANCTRL_mode(*spi, MODE_NORMAL);