Git Product home page Git Product logo

f1-telemetry-client's People

Contributors

dependabot[bot] avatar derkjanspeelman avatar dominicluidold avatar irvingswiftj avatar jonybur avatar msansoni avatar primegoose avatar ryry6 avatar wellmafra avatar wheron99 avatar z0mt3c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

f1-telemetry-client's Issues

Add support for F1 2019

F1 2019 is due to be released in about a week or so hence filing this issue to track any changes that need to be done to support F1 2019 (assuming that there will be changes).

  • Assess changes that need to be made for F1 2019
  • Agree on a proper design to support both versions of the game
  • Update code and tests according to the new design specs

Participants Packet: Human drivers name always "Player"

Describe the bug
Unfortunately I always get the name "player" for human drivers instead of the SteamId as mentioned in the codemaster UDP documentation

To Reproduce
every time in MP
I tried telemetry settings on both public and private (the rest is default)

Expected behavior
I would have expected the steam name or the steam id.
please let me know if I just had some wrong settings

Screenshots/Additional information
some extracted examples:

2021,1,7,1,4,14936995217120167532,742.339599609375,20942,255,255,7,0,255,1,4,0,8,29,Player,1
2021,1,7,1,4,14936995217120167532,742.339599609375,20942,255,255,7,0,255,3,0,0,82,29,Player,0
2021,1,7,1,4,14936995217120167532,742.339599609375,20942,255,255,7,0,255,0,1,0,2,0,Player,0
2021,1,7,1,4,14936995217120167532,742.339599609375,20942,255,255,7,0,255,2,5,0,88,29,Player,0
2021,1,7,1,4,14936995217120167532,742.339599609375,20942,255,255,7,0,255,5,3,0,63,29,Player,0

JSON stringify:

{
   "m_header":{
      "m_packetFormat":2021,
      "m_gameMajorVersion":1,
      "m_gameMinorVersion":7,
      "m_packetVersion":1,
      "m_packetId":4,
      "m_sessionUID":"14936995217120167532",
      "m_sessionTime":742.339599609375,
      "m_frameIdentifier":20942,
      "m_playerCarIndex":255,
      "m_secondaryPlayerCarIndex":255
   },
   "m_numActiveCars":7,
   "m_participants":[
      {
         "m_aiControlled":0,
         "m_driverId":255,
         "m_networkId":1,
         "m_teamId":4,
         "m_myTeam":0,
         "m_raceNumber":8,
         "m_nationality":29,
         "m_name":"Player",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":0,
         "m_driverId":255,
         "m_networkId":2,
         "m_teamId":5,
         "m_myTeam":0,
         "m_raceNumber":88,
         "m_nationality":29,
         "m_name":"Player",
         "m_yourTelemetry":0
      },
      {
         "m_aiControlled":0,
         "m_driverId":255,
         "m_networkId":3,
         "m_teamId":0,
         "m_myTeam":0,
         "m_raceNumber":82,
         "m_nationality":29,
         "m_name":"Player",
         "m_yourTelemetry":0
      },
      {
         "m_aiControlled":1,
         "m_driverId":63,
         "m_networkId":255,
         "m_teamId":3,
         "m_myTeam":0,
         "m_raceNumber":6,
         "m_nationality":13,
         "m_name":"LATIFI",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":54,
         "m_networkId":255,
         "m_teamId":8,
         "m_myTeam":0,
         "m_raceNumber":4,
         "m_nationality":10,
         "m_name":"NORRIS",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":0,
         "m_driverId":255,
         "m_networkId":0,
         "m_teamId":1,
         "m_myTeam":0,
         "m_raceNumber":2,
         "m_nationality":0,
         "m_name":"Player",
         "m_yourTelemetry":0
      },
      {
         "m_aiControlled":1,
         "m_driverId":7,
         "m_networkId":255,
         "m_teamId":0,
         "m_myTeam":0,
         "m_raceNumber":44,
         "m_nationality":10,
         "m_name":"HAMILTON",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":9,
         "m_networkId":255,
         "m_teamId":2,
         "m_myTeam":0,
         "m_raceNumber":33,
         "m_nationality":22,
         "m_name":"VERSTAPPEN",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":14,
         "m_networkId":255,
         "m_teamId":2,
         "m_myTeam":0,
         "m_raceNumber":11,
         "m_nationality":52,
         "m_name":"PEREZ",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":2,
         "m_networkId":255,
         "m_teamId":8,
         "m_myTeam":0,
         "m_raceNumber":3,
         "m_nationality":3,
         "m_name":"RICCIARDO",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":19,
         "m_networkId":255,
         "m_teamId":4,
         "m_myTeam":0,
         "m_raceNumber":18,
         "m_nationality":13,
         "m_name":"STROLL",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":17,
         "m_networkId":255,
         "m_teamId":5,
         "m_myTeam":0,
         "m_raceNumber":31,
         "m_nationality":28,
         "m_name":"OCON",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":58,
         "m_networkId":255,
         "m_teamId":1,
         "m_myTeam":0,
         "m_raceNumber":16,
         "m_nationality":53,
         "m_name":"LECLERC",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":59,
         "m_networkId":255,
         "m_teamId":6,
         "m_myTeam":0,
         "m_raceNumber":10,
         "m_nationality":28,
         "m_name":"GASLY",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":94,
         "m_networkId":255,
         "m_teamId":6,
         "m_myTeam":0,
         "m_raceNumber":22,
         "m_nationality":43,
         "m_name":"TSUNODA",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":6,
         "m_networkId":255,
         "m_teamId":9,
         "m_myTeam":0,
         "m_raceNumber":7,
         "m_nationality":27,
         "m_name":"RÄIKKÖNEN",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":74,
         "m_networkId":255,
         "m_teamId":9,
         "m_myTeam":0,
         "m_raceNumber":99,
         "m_nationality":41,
         "m_name":"GIOVINAZZI",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":79,
         "m_networkId":255,
         "m_teamId":7,
         "m_myTeam":0,
         "m_raceNumber":9,
         "m_nationality":0,
         "m_name":"MAZEPIN",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":1,
         "m_driverId":81,
         "m_networkId":255,
         "m_teamId":7,
         "m_myTeam":0,
         "m_raceNumber":16,
         "m_nationality":29,
         "m_name":"SCHUMACHER",
         "m_yourTelemetry":1
      },
      {
         "m_aiControlled":0,
         "m_driverId":255,
         "m_networkId":5,
         "m_teamId":3,
         "m_myTeam":0,
         "m_raceNumber":63,
         "m_nationality":29,
         "m_name":"Player",
         "m_yourTelemetry":0
      }
   ]
}

Incorrect packet types

Describe the bug
The packet type definitions are incorrect.

For example, in game version 2022, the fields for sector 1 and 2 times are m_sector1TimeInMS and m_sector2TimeInMS, but the type definitions have them as m_sector1Time: m_sector2Time.

I've been getting around this by using @ts-expect-error annotations for the time being and just using the correct field names as defined in the actual parser.

Expected behavior
Packet type definitions should reflect the data being received, which can be different based on the game version.

It doesn't work

Describe the bug
I followed the documentation and it didn't work

To Reproduce
Do what you said to do
You also can not pick an IP address it defaults to 0.0.0.0

Expected behavior
Get lap data

Question: Session History

Hey there 👋 .

First, I just want to say that I love the client that you have produced here, it has been great to work with to power our league telemetry!

I was curious if there is a road map for getting some of the newer 2021 features added to the client, specifically the Session History. It seems that with some of the removals from 2020, the only way to get some of the data that we look for is to parse it out of the history when we need it, so we are a bit stuck on the 2020 packet spec for now.

Also, a small request for us dependent folks - it would be fantastic if breaking changes, like moving to the new UDP specification was a breaking change (increment the largest number). That way downstream dependents don't accidentally get the new 2021 client.

Thanks!

Issue with RangeError

Describe the bug
When trying to console.log PACKETS.carTelemetry data a RangeError: Offset is outside the bounds of the DataView exception is thrown.

To Reproduce
Using F1 2021 configuration
Tried hotlapping while using npm package, following the example in the readme.

Expected behavior
Should not throw exception and die.

Screenshots/Additional information

{ m_speed: 0,
       m_clutch: 0,
       m_gear: 0,
       m_engineRPM: 0,
       m_drs: 0,
       m_revLightsPercent: 0,
       m_brakesTemperature: [Array],
       m_tyresSurfaceTemperature: [Array],
       m_tyresInnerTemperature: [Array],
       m_engineTemperature: 0,
       m_tyresPressure: [Array] } ] }
undefined:109
$tmp1.m_ersHarvestedThisLapMGUH = dataView.getFloat32(offset, true);
                                           ^

RangeError: Offset is outside the bounds of the DataView
    at DataView.getFloat32 (<anonymous>)
    at PacketCarStatusDataParser.eval [as compiled] (eval at Parser.compile (/home/pi/Downloads/F1telemetry/node_modules/binary-parser/dist/binary_parser.js:473:25), <anonymous>:109:44)
    at PacketCarStatusDataParser.Parser.parse (/home/pi/Downloads/F1telemetry/node_modules/binary-parser/dist/binary_parser.js:523:21)
    at PacketCarStatusDataParser.fromBuffer (/home/pi/Downloads/F1telemetry/node_modules/f1-telemetry-client/build/src/parsers/F1Parser.js:11:21)
    at new PacketCarStatusDataParser (/home/pi/Downloads/F1telemetry/node_modules/f1-telemetry-client/build/src/parsers/packets/PacketCarStatusDataParser.js:17:26)
    at Function.parseBufferMessage (/home/pi/Downloads/F1telemetry/node_modules/f1-telemetry-client/build/src/index.js:48:28)
    at F1TelemetryClient.handleMessage (/home/pi/Downloads/F1telemetry/node_modules/f1-telemetry-client/build/src/index.js:118:49)
    at Socket.socket.on (/home/pi/Downloads/F1telemetry/node_modules/f1-telemetry-client/build/src/index.js:155:47)
    at Socket.emit (events.js:198:13)
    at UDP.onMessage [as onmessage] (dgram.js:628:8)

Inconsistent TyreStintHistoryData compounds from Session History Packet

Describe the bug
The m_tyreActualCompound and m_tyreVisualCompound from TyreStintHistoryData from the Session History packet is sometimes incorrect. I'm not sure if this a bug from the typing of the client, or from the game.

To Reproduce
I was doing grand prix with medium session length. I always do soft (C4 / 18) -> medium (C3 / 19) stints. My issue is, using the m_tyreActualCompound from the Session History packet and TYRES constant from the client, I sometimes got the wrong compound, sometimes I got soft (C5 / 17) -> soft (C4 / 18) instead of soft (C4 / 18) -> medium (C3 / 19).
My telemetry settings are:
Broadcast: Off
IP: 127.0.0.1
Port: 20777
Rate: 20Hz
Format: 2022
Your Telemetry: Restricted
Show Player Names: Off

Expected behavior
I should get correct compound which is soft (C4 / 18) -> medium (C3 / 19).

Screenshots/Additional information
Here is a screenshot of the wrong stints history data from Session History packet:
image

Doesn’t works or maybe i wrong something

Hello to everybody,
I’m not a programmer so let me ask you sorry if you will find my issue report stupid.
I followed the indication to install the code with terminal and after that I followed the Comand line to run start but it doesn’t works.
There is someone so kindly to explain me how can use it? It is my first time on github and i don’t know too about this.
Thank you in advance!
F38C1BCF-1D50-4D94-A5C0-9C602E34DB3F

Special characters in driver names

Describe the bug
In multiplayer it's more enhanced but even in solo player mode, the 2022 udp telemetry gives me special characters in front of the driver names in the participation data feed.
Sometimes its more extreem with a lots of special characters prefixing a name.

To Reproduce
Go to multiplayer game or solo game and check participation data.

Expected behavior
No special characters in names

Screenshots/Additional information
Solo and multiplayer screenshots of the data:
image
image
image

Class F1TelemetryClient extends the EventEmitter namespace

I made a pullrequest as well: #29. But, this pullrequest also contains 64-bit unsigned integer support for the m_sessionUID in the PacketHeader.

The F1TelemetryClient extends the EventEmitter namespace. This gives my project the following errors:

server/index.ts:

client.on(PACKETS.session, console.log);
// error: Property 'on' does not exist on type 'F1TelemetryClient'. ts(2339)

Property 'on' does not exist on type 'F1TelemetryClient'

f1-telemetry-client\build\src\index.d.ts:

declare class F1TelemetryClient extends EventEmitter {
// error: Type 'typeof EventEmitter' is not a constructor function type. ts(2507)

Type 'typeof EventEmitter' is not a constructor function type


How to Reproduce:

npm init
npm i typescript ts-node-dev f1-telemetry-client
npm i @types/node -D

server/index.ts:

import { F1TelemetryClient, constants } from 'f1-telemetry-client';
const { PACKETS } = constants;

const client: F1TelemetryClient = new F1TelemetryClient();

client.on(PACKETS.session, console.log);
//     ^ error
client.on(PACKETS.motion, console.log);
client.on(PACKETS.lapData, console.log);
client.on(PACKETS.event, console.log);
client.on(PACKETS.participants, console.log);
client.on(PACKETS.carSetups, console.log);
client.on(PACKETS.carTelemetry, console.log);
client.on(PACKETS.carStatus, console.log);

// start
client.start();

// stop:
[`exit`,
 `SIGINT`,
 `SIGUSR1`,
 `SIGUSR2`,
 `uncaughtException`,
 `SIGTERM`,
].forEach(eventType => {
  (process as NodeJS.EventEmitter).on(eventType, () => client.stop());
});

server/tsconfig.json:

{
    "compilerOptions": {
        "module": "commonjs",
        "outDir": "../dist/server",
        "strictNullChecks": true,
        "esModuleInterop": true,
    },
    "exclude": [
        "node_modules"
    ],
}

Format of m_wheelSlip/m_wheelSpeed changed from array of floats to array of objects

Describe the bug
While still an array, the data format that the client sends for wheel slip and wheel speed changed the format. Previously the data was a simple array of float values. In v0.1.10 it changed to an array of objects.

// Before
m_wheelSlip = [0,0,0,0]

// After
m_wheelSlip = [
  { m_wheelSlip: 0},
  { m_wheelSlip: 0},
  { m_wheelSlip: 0},
  { m_wheelSlip: 0},
]

This change does not seem intentional to me and also makes the format a bit more complicated than it has to be IMO.

To Reproduce

const { F1TelemetryClient, constants } = require("f1-telemetry-client");
const { PACKETS } = constants;

const client = new F1TelemetryClient();
client.on(PACKETS.motion, m => console.log(m.m_wheelSlip));

Expected behavior
The data should be a simple array of floats

Can't resolve 'dgram'

Describe the bug
Hi I have created an empty react with typescript app and when starting I get the error

Can't resolve 'dgram' in 'D:**\node_modules\f1-telemetry-client\build\src'

I have tried installing dgram manually but it still didn't fix the issue

Module parse failed: Unexpected token

I've get the following error when i'm trying to use this library.
Any idea why and how I could fix it?

Module parse failed: Unexpected token (43:8)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

|  */
| class F1TelemetryClient extends events_1.EventEmitter {
>     port;
|     bigintEnabled;
|     forwardAddresses;

Connected and Disconnected events

I need events that tells me if the telemetry client is connected or when the telemetry client goes to a disconnected state.

There is a difference, because when you hit esc in the game, the telemetry feed pauses.
But when you exit from a session, we should have a disconnect event firing.

To add to this, gameIsPaused property is not mapped correctly in the PacketSessionData object. It's value is always 0, even when i pause the game.

@jonybur

Error while parsing event data [2019 UDP format]

Hello. I was testing my application, and driving around a circuit (it was Albert Park, Australia). When I entered new lap, telemetry client crashed. I don't think it's a bug in my application, the error output only points at parser itself. I use the latest UDP format, which is sent with 10 Hz frequency. Also, here's the error report I got:

PATH_TO_MY_APP\node_modules\f1-telemetry-client\build\src\parsers\packets\PacketEventDataParser.js:13
                this.uint8('vehicleIdx').float('lapTime');
                                         ^

TypeError: this.uint8(...).float is not a function
    at PacketEventDataParser.unpack2019Format (PATH_TO_MY_APP\node_modules\f1-telemetry-client\build\src\parsers\packets\PacketEventDataParser.js:13:42)
    at new PacketEventDataParser (PATH_TO_MY_APP\node_modules\f1-telemetry-client\build\src\parsers\packets\PacketEventDataParser.js:34:18)
    at F1TelemetryClient.parseMessage (PATH_TO_MY_APP\node_modules\f1-telemetry-client\build\src\index.js:74:28)
    at Socket.<anonymous> (PATH_TO_MY_APP\node_modules\f1-telemetry-client\build\src\index.js:93:45)
    at Socket.emit (events.js:196:13)
    at UDP.onMessage [as onmessage] (dgram.js:849:8)

Feel free to ask about more details, if you need.
Cheers.

Edit 1:

@jonybur, I've noticed, that this error occurrs after finishing 1st lap of the session (time trial, to be precise).

Edit 2:

The error actually occurrs every time you finish a lap.

Normalise values for throttle/brake/steering

Is your feature request related to a problem? Please describe.
The 2018 format uses a range from 0-100 for throttle, brake and steering while the 2019 format uses a range from 0 - 1.0.

Describe the solution you'd like
Normalise the values so developers only need to deal with one range, either 0-100 or 0.0 - 1.0 by handling this at the library level.

Describe alternatives you've considered

  • Each application handles it on their own and normalises the values if it supports both game version. No change at the library level.
  • Instead of always normalising the values one or the other way, introduce a setting where developers can opt-in to this behaviour/chose the kind of range they want.
  • Convince Codemasters to settle on a single range, which would then probably be 0-100 since that is what the 2018 game used.

Participant Packet has incorrect data in MP

Describe the bug
There is an issue with parsing Participant data packets. The data returned by the client makes no sense, violating som values. For example m_aiControlled being neither 0 nor 1

To Reproduce
Create a multiplayer practice lobby and add AI.

Expected behavior
Values to make sense, such as being valid ranges, not cutting off drivers' names, complete information (m_yourTelemetry is missing)

Screenshots/Additional information

{
m_header: {
m_packetFormat: 2021,
m_gameMajorVersion: 1,
m_gameMinorVersion: 5,
m_packetVersion: 1,
m_packetId: 4,
m_sessionUID: 3818434258042463724n,
m_sessionTime: 450.77685546875,
m_frameIdentifier: 32103,
m_playerCarIndex: 19,
m_secondaryPlayerCarIndex: 255
},
m_participants: [
{
m_aiControlled: 20,
m_driverId: 1,
m_teamId: 7,
m_raceNumber: 255,
m_nationality: 0,
m_name: '\x00,\nHAMILTON'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 1,
m_nationality: 1,
m_name: '\x0F�\x00\x00M\x1BBOTTAS'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x01\x01\t�\x02\x00!\x16VERSTAPPEN'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x01\x01\x0E�\x02\x00\x0B4PEREZ'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x01\x01\x02�\b\x00\x03\x03RICCIARDO'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x016�\b\x00\x04\nNORRIS'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x13�\x04\x00\x12\rSTROLL'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\r�\x04\x00\x05\x1DVETTEL'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x03�\x05\x00\x0EMALONSO'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x11�\x05\x00\x1F\x1COCON'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01:�\x01\x00\x105LECLERC'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00�\x01\x007MSAINZ'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01;�\x06\x00\n\x1CGASLY'
},
{
m_aiControlled: 0,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01^�\x06\x00\x16+TSUNOD'
},
{
m_aiControlled: 65,
m_driverId: 0,
m_teamId: 0,
m_raceNumber: 0,
m_nationality: 0,
m_name: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x06�\t\x00\x07\x1BRÄ'
},
{
m_aiControlled: 73,
m_driverId: 75,
m_teamId: 75,
m_raceNumber: 195,
m_nationality: 150,
m_name: 'NEN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01J�\t\x00c)'
},
{
m_aiControlled: 71,
m_driverId: 73,
m_teamId: 79,
m_raceNumber: 86,
m_nationality: 73,
m_name: 'NAZZI\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01O�\x07'
},
{
m_aiControlled: 0,
m_driverId: 9,
m_teamId: 0,
m_raceNumber: 77,
m_nationality: 65,
m_name: 'ZEPIN\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01'
},
{
m_aiControlled: 81,
m_driverId: 255,
m_teamId: 7,
m_raceNumber: 0,
m_nationality: 47,
m_name: '\x1DSCHUMACHER'
},
{
m_aiControlled: 0,
m_driverId: 1,
m_teamId: 1,
m_raceNumber: 63,
m_nationality: 255,
m_name: '\x03\x00\x06\rLATIFI'
}
]
}

No data in practice sessions.

Describe the bug
Basically if you'r doing a race, you do have the telemtry outputting nicely.
But as soon as you jump into a practice session, there is no data coming out of the listeners.

Broadcast mode

The following line binds the port to the localhost address, therefore prevents broadcast mode from working. Removing this line will allow both a bound to localhost and broadcast to work.

address: this.address,

LobbyInfo doesn't have player user names in multiplayer mode

All players have 'Player' username in multiplayer mode.
Can you please fix this?

If it's an AI, then the username comes through, but in case of a non-ai player, the username is not populated correctly. As I said, everyone has 'Player' as his username which is clearly wrong.

Fastest lap event not firing

Describe the bug
The Fastest Lap event doesn't seem to be firing.

To Reproduce

Configuration:

IP: 127.0.0.1
Port: 20777
Send Rate: 20Hz
Format: 2021

Steps:

  • Watch event packets
  • Spectate a race
  • Watch until someone gets the fastest lap

Expected behavior
When the fastest lap is broken, I expect to see a FTLP event fire.

Ability to read incoming packets from a remote machine

When developing a telemetry application for a remote device of mine, I find it a bit convoluted to set up a forwarding application in order to forward the telemetry packets to my second device (not running the game itself). At present, the client binds to the localhost.

Ideally, I would (personally) like the client to support reading packets from a remote sources as a potential option when constructing the client - though defaulting to only binding to localhost.

This may be a naive approach - I haven't contributed to any public repos before - but I assume this could be implemented by passing another opt to the constructor (ie, the address we want to bind to, defaulting to 'localhost'), and the using this in the bind at index.ts:196.

'Parser' only refers to a type, but is being used as a namespace here.

Describe the bug
I tried to run the repository code using yarn start and I receive the error TS2702

To Reproduce

  1. I'd cloned the repository and enter on cloned folder
  2. I had run yarn to install dependencies
  3. I put yarn start to build and run tsc

Expected behavior
I just expect to run without errors

Screenshots/Additional information
image

Help Requested

Hi,

I am attempting to create a react web app for use in Twitch streams (using OBS). I am fairly new to JS and React and am having a lot of trouble figuring out how to actually parse the telemetry information to my app. I have tried including the f1-telemetry-client a number of ways but have not had any luck. I was hoping someone would be kind enough to post an example of a simple react app, or even just html page updating a leaderboard via the packets. This would be enough to get me started. Ultimately I am trying to created a dynamic web app that will show information like the leaderboard (with options to show/hide current tires, age of tires, interval to leader, interval to next driver ahead, DRS activation, fastest lap, penalties, number of pitstops, DNF, DNS, etc), as well as current and project weather information, average pit stop time, driver vs driver interval (pick drivers to compare from drop down menu), and more. I will be making my own project opensource for other F1 2021 Streamers to use if I can ever get it to work. Any help will be greatly appreciated!

Thanks for your time,
Bryan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.