vicpopo wrote:Hi ,
First you remember this post :http://www.x-sim.de/forum/viewtopic.php?f=40&t=1083&start=30#p9937
That means for me that the pid for current lap is given by obd2 protocol that Sirnoname programed.
I didn't yet tested but below my proposition to proceed :
1- As I wrote in a previous post you have tu drive one complete lap before showing current lap time counted .The first thing is to check in input menu that the current lap time will change form -1000 to numerical value . I didn't remember which data format but in thousands (32 547?) .Write both values the one in input value and the one in game display .After you can calculate the data format.
Sirnoname wrote that the 2 word 4* ** 00 00 the last two words represents ms .The thing I not checked is if this value is the difference or the total current time lap.
Exemple : you finished a lap and your time is 1min 42 s 23 43 ,
that means that the value in ms is 102 234 ms or 01 8F 5A in Hex .There are 3 words not 2 as the pid give.
That the point I 'm with ths current time lap.
For PositionValue is more simple than laptime,I had tried to debug the ReceiveValueWithTimeout function with it first.
and found the problem is "if(arduinoserialbuffer != receivetrigger)" never be reached.
I'm not sure why "4"(ascii 52) is the trigger? and why I can't recevice such trigger for Postionvalue command.
The data I received is 62,78,79,32,68,65,84,65,13,62(I translater to ascii char is "NO DATA <enter>") is that mean the version of X-sim is use not supported such command?