more DTCs
This commit is contained in:
		| @@ -5,10 +5,8 @@ MCP_CAN CAN0(GPIO_CS_CAN); | |||||||
| void Init_CAN() | void Init_CAN() | ||||||
| { | { | ||||||
|  |  | ||||||
|     if (CAN0.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) == CAN_OK) |     if (CAN0.begin(MCP_STDEXT, CAN_500KBPS, MCP_16MHZ) != CAN_OK) | ||||||
|         Serial.println(PSTR("MCP2515 Initialized Successfully!")); |         MaintainDTC(DTC_CAN_TRANSCEIVER_FAILED, true); | ||||||
|     else |  | ||||||
|         Serial.println(PSTR("Error Initializing MCP2515...")); |  | ||||||
|  |  | ||||||
|     CAN0.init_Mask(0, 0, 0x07FF0000); // Init first mask... |     CAN0.init_Mask(0, 0, 0x07FF0000); // Init first mask... | ||||||
|     CAN0.init_Mask(1, 0, 0x07FF0000); // Init second mask... |     CAN0.init_Mask(1, 0, 0x07FF0000); // Init second mask... | ||||||
|   | |||||||
| @@ -8,11 +8,12 @@ | |||||||
| typedef enum DTCNums_e | typedef enum DTCNums_e | ||||||
| { | { | ||||||
|   DTC_NO_GPS_SERIAL, |   DTC_NO_GPS_SERIAL, | ||||||
|   DTC_NO_CAN_SIGNAL, |  | ||||||
|   DTC_TANK_EMPTY, |   DTC_TANK_EMPTY, | ||||||
|   DTC_NO_EEPROM_FOUND, |   DTC_NO_EEPROM_FOUND, | ||||||
|   DTC_EEPROM_CFG_BAD, |   DTC_EEPROM_CFG_BAD, | ||||||
|   DTC_EEPROM_PDS_BAD, |   DTC_EEPROM_PDS_BAD, | ||||||
|  |   DTC_CAN_TRANSCEIVER_FAILED, | ||||||
|  |   DTC_NO_CAN_SIGNAL, | ||||||
|   DTC_LAST_DTC |   DTC_LAST_DTC | ||||||
| } DTCNums_t; | } DTCNums_t; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user