PDA

View Full Version : Possible UDP Version 2 issue



leroythelegend
06-03-2018, 20:49
Hi

I'm having an issue with the UDP Version 2 packets, I was wondering if anyone else has seen this or is just my implementation?

From definitions.hpp

unsigned short sTyreTempLeft[4]; // 256 8
unsigned short sTyreTempCenter[4]; // 264 8
unsigned short sTyreTempRight[4]; // 272 8

from packet capture

256 - 00 00 25 00 2a 00 23 00
264 - 00 00 22 00 26 00 21 00
272 - 00 00 21 00 24 00 20 00

I have decoded the first two bytes of the array as the front-left being 0 where the other 6 bytes have a temp value for front-right rear-left and rear-right? This to me is very odd and that the front left is 0 so IMO i have it wrong unless someone else is seeing the same thing?

Thunderpaul
10-03-2018, 16:58
Hi

I'm having an issue with the UDP Version 2 packets, I was wondering if anyone else has seen this or is just my implementation?

From definitions.hpp

unsigned short sTyreTempLeft[4]; // 256 8
unsigned short sTyreTempCenter[4]; // 264 8
unsigned short sTyreTempRight[4]; // 272 8

from packet capture

256 - 00 00 25 00 2a 00 23 00
264 - 00 00 22 00 26 00 21 00
272 - 00 00 21 00 24 00 20 00

I have decoded the first two bytes of the array as the front-left being 0 where the other 6 bytes have a temp value for front-right rear-left and rear-right? This to me is very odd and that the front left is 0 so IMO i have it wrong unless someone else is seeing the same thing?

Hi I've some problem with my Java application, my Platform is PS4.

Left Temp: [0, 0, 26, 0, 26, 0, 26]

I take from byte 256 up to 263 (in this case for the left temperature, but it also happens with the central and the right.
Also I could not figure out what the pressure is, and I'm working to translate other values ​​like the tire compound into java correctly.

NC-RIGDash
13-03-2018, 17:31
Hi

I'm having an issue with the UDP Version 2 packets, I was wondering if anyone else has seen this or is just my implementation?

From definitions.hpp

unsigned short sTyreTempLeft[4]; // 256 8
unsigned short sTyreTempCenter[4]; // 264 8
unsigned short sTyreTempRight[4]; // 272 8

from packet capture

256 - 00 00 25 00 2a 00 23 00
264 - 00 00 22 00 26 00 21 00
272 - 00 00 21 00 24 00 20 00

I have decoded the first two bytes of the array as the front-left being 0 where the other 6 bytes have a temp value for front-right rear-left and rear-right? This to me is very odd and that the front left is 0 so IMO i have it wrong unless someone else is seeing the same thing?

Wireshark might help you here.
Have the UDP stream running and run wireshark to monitor the raw packets. This will tell you if that is what is being fed out of the game or if your implementation is changing it somehow.
Might help you for a start?

NC-RIGDash
13-03-2018, 17:37
Hi I've some problem with my Java application, my Platform is PS4.

Left Temp: [0, 0, 26, 0, 26, 0, 26]

I take from byte 256 up to 263 (in this case for the left temperature, but it also happens with the central and the right.
Also I could not figure out what the pressure is, and I'm working to translate other values ​​like the tire compound into java correctly.

This is what i have done in java to convert the tyre temps to ints (looks like you have it as a string at the moment). Hopefully this will help you out:
Have byte array with the bytes in
byte[] tyreTemps = Arrays.copyOfRange(gamePacket[0], 276, 280);

Take each byte and convert it
int frontLeft = tyreTemps[0] & 0xFF;
etc
etc

g.stew
13-03-2018, 21:37
See this thread (http://forum.projectcarsgame.com/showthread.php?56963-PCARS2-UDP-API-Bug-reports/page2) for details. It should be fixed in the next patch.

leroythelegend
14-03-2018, 20:42
See this thread (http://forum.projectcarsgame.com/showthread.php?56963-PCARS2-UDP-API-Bug-reports/page2) for details. It should be fixed in the next patch.

Yes thank you, this helps a lot.