From 5da22cf89f52dc602217128019ad668b1df2d645 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Wed, 22 Nov 2023 20:52:09 -0800 Subject: [PATCH] keep support for existing CAN reboot command --- firmware/can.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/can.cpp b/firmware/can.cpp index 65b7218..b87fa1f 100644 --- a/firmware/can.cpp +++ b/firmware/can.cpp @@ -94,10 +94,10 @@ void CanRxThread(void*) } } // If it's a bootloader entry request, reboot to the bootloader! - else if (frame.DLC == 1 && frame.EID == WB_BL_ENTER) + else if ((frame.DLC == 0 || frame.DLC == 1) && frame.EID == WB_BL_ENTER) { // If 0xFF (force update all) or our ID, reset to bootloader, otherwise ignore - if (frame.data8[0] == 0xFF || frame.data8[0] == GetConfiguration()->CanIndexOffset) + if (frame.DLC == 0 || frame.data8[0] == 0xFF || frame.data8[0] == GetConfiguration()->CanIndexOffset) { SendAck();