isValidPID function is stopping at PID 0x7F, why?

Inquiry and support for Freematics products
Post Reply
moll
Posts: 2
Joined: Wed Nov 04, 2020 12:40 am

isValidPID function is stopping at PID 0x7F, why?

Post 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
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

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

Post by stanley »

This has just been updated. Several years ago, PIDs over 0x7F are not disclosed.
moll
Posts: 2
Joined: Wed Nov 04, 2020 12:40 am

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

Post by moll »

Thanks Stanley
Post Reply