Page 1 of 1

isValidPID function is stopping at PID 0x7F, why?

Posted: Wed Nov 04, 2020 12:46 am
by moll
Hello,

I try to read out the list of all supported PIDs of a car, but I noticed that PIDs equal/above 0x7F are all reporting true, when using the isValidPID function? Due to the OBD PID list on wikipedia I assume the behaviour is wrong https://en.wikipedia.org/wiki/OBD-II_PIDs

Code: Select all

bool COBD::isValidPID(byte pid)
{
	if (pid >= 0x7f) //<---- this looks wrong to me.
		return true;
	pid--;
	byte i = pid >> 3;
	byte b = 0x80 >> (pid & 0x7);
	return (pidmap[i] & b) != 0;
}
Best Christian

Re: isValidPID function is stopping at PID 0x7F, why?

Posted: Sun Nov 08, 2020 10:37 pm
by stanley
This has just been updated. Several years ago, PIDs over 0x7F are not disclosed.

Re: isValidPID function is stopping at PID 0x7F, why?

Posted: Tue Nov 10, 2020 8:09 pm
by moll
Thanks Stanley