Page 1 of 1

ISO Diagnostics

Posted: Fri Dec 11, 2015 7:43 pm
by Rhinoman
I may as well start a new thread. I'm going to implement J1979 Mode 1 diagnostics. My first problem is that I don't know what format the error codes are in. I found this line:

Code: Select all

getErrorCodes(&localErrorCopy);
		for (int p = 0; p < localErrorCopy.count; p++) {
                 ....
What format are the codes in? I have a vague recollection that they are just Mazda codes, ie MAF would be stored as 8h. If there are no codes is the length = 0?

Re: ISO Diagnostics

Posted: Fri Dec 11, 2015 7:52 pm
by AndreyB
Do you have the project imported into Eclipse?
Ctrl-<mouse click> on &localErrorCopy gets you to

Code: Select all

error_codes_set_s localErrorCopy;
Ctrl-<mouse click> on error_codes_set_s gets you to

Code: Select all

typedef struct {
	int count;
	obd_code_e error_codes[MAX_ERROR_CODES_COUNT];
} error_codes_set_s;
and Ctrl-<mouse click> on obd_code_e gets you to

Code: Select all

@file obd_error_codes.h
More info at http://www.obd-codes.com/faq/obd2-codes-explained.php
typedef enum {
//P0001 Fuel Volume Regulator Control Circuit/Open
//P0002 Fuel Volume Regulator Control Circuit Range/Performance
//P0003 Fuel Volume Regulator Control Circuit Low
...
	//P0339 Crankshaft Position Sensor A Circuit Intermittent
	//P0340 Camshaft Position Sensor Circuit Malfunction
	 OBD_Camshaft_Position_Sensor_Circuit_Range_Performance = 341,
	//P0342 Camshaft Position Sensor Circuit Low Input
	//P0343 Camshaft Position Sensor Circuit High Input
...
	//P0556 Brake Booster Pressure Sensor Circuit Range/Performance
	//P0557 Brake Booster Pressure Sensor Circuit Low
	//P0558 Brake Booster Pressure Sensor Circuit High
	//P0559 Brake Booster Pressure Sensor Circuit Intermittent
	OBD_System_Voltage_Malfunction = 560,
	//P0561 System Voltage Unstable
	//P0562 System Voltage Low
	//P0563 System Voltage High
} obd_code_e;

Re: ISO Diagnostics

Posted: Fri Dec 11, 2015 8:10 pm
by Rhinoman
I have the project in Eclipse, I'm not familiar with how Eclipse works, I will check that out thanks.

Re: ISO Diagnostics

Posted: Fri Dec 11, 2015 8:13 pm
by AndreyB
ctrl-mouse click "go to definition" is one of the two essential code navigation actions
the other one is ctrl-sfigt-g which is "find usages"