UNPKG

@z0mt3c/f1-telemetry-client

Version:

[![Node.js CI](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml/badge.svg)](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml) [![NPM Release](https://img.shields.io/npm/v/@z0mt3c/f1-telemetry-client.sv

22 lines (21 loc) 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CarDamageDataParser = void 0; const F1Parser_1 = require("../F1Parser"); class CarDamageDataParser extends F1Parser_1.F1Parser { constructor(packetFormat) { super(); this.array('m_tyresWear', { length: 4, type: 'floatle' }).array('m_tyresDamage', { length: 4, type: 'uint8' }).array('m_brakesDamage', { length: 4, type: 'uint8' }); if (packetFormat >= 2025) this.array('m_tyreBlisters', { length: 4, type: 'uint8' }); this.uint8('m_frontLeftWingDamage').uint8('m_frontRightWingDamage').uint8('m_rearWingDamage').uint8('m_floorDamage').uint8('m_diffuserDamage').uint8('m_sidepodDamage').uint8('m_drsFault'); if (packetFormat >= 2022) { this.uint8('m_ersFault'); } this.uint8('m_gearBoxDamage').uint8('m_engineDamage').uint8('m_engineMGUHWear').uint8('m_engineESWear').uint8('m_engineCEWear').uint8('m_engineICEWear').uint8('m_engineMGUKWear').uint8('m_engineTCWear'); if (packetFormat >= 2022) { this.uint8('m_engineBlown').uint8('m_engineSeized'); } } } exports.CarDamageDataParser = CarDamageDataParser;