From 6a95e8d9d3fb17fc72dcbe2e1a85e49dc634457f Mon Sep 17 00:00:00 2001 From: Tom_evnut Date: Mon, 27 Jan 2025 20:50:47 +0000 Subject: [PATCH] Update stm32_vcu.cpp --- src/stm32_vcu.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/stm32_vcu.cpp b/src/stm32_vcu.cpp index b14973f..ff60f41 100644 --- a/src/stm32_vcu.cpp +++ b/src/stm32_vcu.cpp @@ -586,6 +586,8 @@ static void Ms10Task(void) } if(opmode==MOD_RUN) Param::SetInt(Param::canctr, (Param::GetInt(Param::canctr) + 1) & 0xF);//Update the OI can counter in RUN mode only + ControlCabHeater(opmode); + ////////////////////////////////////////////////// // MODE CONTROL SECTION // ////////////////////////////////////////////////// @@ -673,7 +675,6 @@ static void Ms10Task(void) ErrorMessage::Post(ERR_PRECHARGE); opmode = MOD_PCHFAIL; } - Param::SetInt(Param::opmode, opmode); break; case MOD_PCHFAIL: @@ -713,16 +714,14 @@ static void Ms10Task(void) { opmode = MOD_OFF; rlyDly=250;//Recharge sequence timer for delayed shutdown - Param::SetInt(Param::opmode, opmode); //set opmode to OFF when leaving charge state + Param::SetInt(Param::opmode, opmode); //set opmode to OFF when leaving charge state } break; } - ControlCabHeater(opmode); if (Param::GetInt(Param::ShuntType) == 2) SBOX::ControlContactors(opmode,canInterface[Param::GetInt(Param::ShuntCan)]);//BMW contactor box if (Param::GetInt(Param::ShuntType) == 3) VWBOX::ControlContactors(opmode,canInterface[Param::GetInt(Param::ShuntCan)]);//VW contactor box - } static void Ms1Task(void)