From 11b9564b0728a078a1a43ed061607ad66d32d865 Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Tue, 31 May 2022 12:49:21 +0200 Subject: [PATCH] Fixed can still having errors when both boards are deactivated --- main/can.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/can.cpp b/main/can.cpp index 94c2799..bfc0fa7 100644 --- a/main/can.cpp +++ b/main/can.cpp @@ -265,6 +265,9 @@ void sendCanCommands() static uint32_t can_sequential_error_cnt = 0; static uint32_t can_sequential_bus_errors = 0; + if (!configs.controllerHardware.sendFrontCanCmd.value() && !configs.controllerHardware.sendBackCanCmd.value()) + return; + constexpr auto send = [](uint32_t addr, auto value){ twai_message_t message; twai_status_info_t status_info;