From 7879d6a3ccd8fa552e980d2b7447675394ab2e77 Mon Sep 17 00:00:00 2001 From: dynfer <102673508+dynfer@users.noreply.github.com> Date: Fri, 23 Feb 2024 00:23:06 +0100 Subject: [PATCH] Conditional heater enable (#1185) --- speeduino/comms_CAN.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/speeduino/comms_CAN.cpp b/speeduino/comms_CAN.cpp index 58ecec0bde..23e20ed134 100644 --- a/speeduino/comms_CAN.cpp +++ b/speeduino/comms_CAN.cpp @@ -84,7 +84,7 @@ void receiveCANwbo() outMsg.flags.extended = 1; outMsg.len = 2; outMsg.buf[0] = currentStatus.battery10; // We don't do any conversion since factor is 0.1 and speeduino value is x10 - outMsg.buf[1] = 0x1; // Enable heater + outMsg.buf[1] = BIT_CHECK(currentStatus.engine, BIT_ENGINE_RUN) ? 0x1 : 0x0; // Enable heater once engine is running (ie. above cranking rpm), this condition can be changed to CLT above certain temp and so on. Can0.write(outMsg); if ((inMsg.id == 0x190 || inMsg.id == 0x192)) {