Added DTC-Table in WebUI and improved DTC-System
This commit is contained in:
@@ -22,7 +22,7 @@ uint32_t Process_CAN_WheelSpeed()
|
||||
#define FACTOR_RWP_KMH_890ADV 18 // Divider to convert Raw Data to km/h
|
||||
|
||||
can_frame canMsg;
|
||||
static uint32_t lastRecTimestamp;
|
||||
static uint32_t lastRecTimestamp = 0;
|
||||
uint16_t RearWheelSpeed_raw;
|
||||
|
||||
if (CAN0.readMsgBuf(&canMsg.can_id, &canMsg.can_dlc, canMsg.data) == CAN_OK)
|
||||
@@ -40,18 +40,7 @@ uint32_t Process_CAN_WheelSpeed()
|
||||
return milimeters_to_add;
|
||||
}
|
||||
|
||||
if (millis() > lastRecTimestamp + 10000)
|
||||
{
|
||||
if (globals.systemStatus != sysStat_Shutdown)
|
||||
globals.systemStatus = sysStat_Error;
|
||||
MaintainDTC(DTC_NO_CAN_SIGNAL, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (globals.systemStatus != sysStat_Shutdown)
|
||||
globals.systemStatus = globals.resumeStatus;
|
||||
MaintainDTC(DTC_NO_CAN_SIGNAL, false);
|
||||
}
|
||||
MaintainDTC(DTC_NO_CAN_SIGNAL, (millis() > lastRecTimestamp + 10000));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user