Skip to content

Commit

Permalink
Merge pull request #159 from damienmaguire/master
Browse files Browse the repository at this point in the history
Bring inline with Master
  • Loading branch information
Tom-evnut authored Feb 12, 2025
2 parents 9533afb + 04d3e3a commit 894a361
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Foccci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static uint8_t CanConfigTxArr[10][8]=
static uint8_t CanConfigRxArr[7][8]=
{
{0x58,0x03,0x00,0x00,0x17,0x00,0x0,0x1},
{0x58,0x03,0x00,0x00,0x1D,0x00,0x2,0x6},
{0x58,0x03,0x00,0x00,0x1D,0x00,0x2,0x4},
{0x58,0x03,0x00,0x00,0x5,0x00,0x8,0x8},
{0x58,0x03,0x00,0x00,0x6,0x00,0x10,0x10},
{0x58,0x03,0x00,0x00,0x3,0x00,0x20,0x10},
Expand Down
3 changes: 2 additions & 1 deletion src/hwinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ void tim3_setup()
// General purpose pwm output. Push/pull driven to +12v/gnd. Timer 3 Chan 2 PA7.
// General purpose pwm output. Push/pull driven to +12v/gnd. Timer 3 Chan 1 PA6.
////////////////////////////////////////////////////////////////////////
bool CPspoofPres,GS450hOil = 0;
bool CPspoofPres = 0;
bool GS450hOil = 0;
///PWM3
if (Param::GetInt(Param::PWM3Func) == IOMatrix::PWM_TIM3)
{
Expand Down
12 changes: 6 additions & 6 deletions src/stm32_vcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,6 @@ 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 //
//////////////////////////////////////////////////
Expand Down Expand Up @@ -673,6 +671,7 @@ static void Ms10Task(void)
ErrorMessage::Post(ERR_PRECHARGE);
opmode = MOD_PCHFAIL;
}
Param::SetInt(Param::opmode, opmode);
break;

case MOD_PCHFAIL:
Expand All @@ -688,15 +687,14 @@ static void Ms10Task(void)
if(rlyDly==0)
{
DigIo::dcsw_out.Set();
Param::SetInt(Param::opmode, opmode);//Only set opmode to charge once Main Contactor is shut.
}
ErrorMessage::UnpostAll();
if(!chargeMode)
{
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);
break;

case MOD_RUN:
Expand All @@ -705,21 +703,23 @@ static void Ms10Task(void)
{
DigIo::dcsw_out.Set();
DigIo::inv_out.Set();//inverter power on
Param::SetInt(Param::opmode, MOD_RUN); //Only set opmode to Run once main contactor is shut
}
Param::SetInt(Param::opmode, MOD_RUN);
ErrorMessage::UnpostAll();
if(!selectedVehicle->Ready())
{
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);
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)
Expand Down

0 comments on commit 894a361

Please sign in to comment.