Master_Interface/Core/Src/Check_Shunt_Limits.c

24 lines
478 B
C

/*
* Check_Shunt_Limits.c
*
* Created on: Jun 16, 2022
* Author: max
*/
#include "Check_Shunt_Limits.h"
void CheckShuntLimits() {
uint32_t now = HAL_GetTick();
if (((shuntlastmessage + SHUNT_TIMEOUT) < now) && (now > 2000)) {
AMS_Error_Handler(AMS_ERRORCODE_TIMEOUT_SHUNT, 0, NULL);
}
/*if(shuntcurrent > SHUNT_OVERCURRENT)
{
AMS_Error_Handler(0x07);
}
if(shuntbusbartemp > SHUNT_OVERTEMP)
{
AMS_Error_Handler(0x08);
}*/
}