@z0mt3c/f1-telemetry-client
Version:
[](https://github.com/z0mt3c/f1-telemetry-client/actions/workflows/node.js.yml) [ • 1.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FinalClassificationDataParser = void 0;
const F1Parser_1 = require("../F1Parser");
class FinalClassificationDataParser extends F1Parser_1.F1Parser {
constructor(packetFormat) {
super();
this.uint8('m_position').uint8('m_numLaps').uint8('m_gridPosition').uint8('m_points').uint8('m_numPitStops').uint8('m_resultStatus');
if (packetFormat >= 2025)
this.uint8('m_resultReason');
if (packetFormat >= 2021) {
this.uint32le('m_bestLapTimeInMS');
}
else {
this.floatle('m_bestLapTime');
}
this.doublele('m_totalRaceTime');
this.uint8('m_penaltiesTime')
.uint8('m_numPenalties')
.uint8('m_numTyreStints')
.array('m_tyreStintsActual', {
length: 8,
type: 'uint8',
})
.array('m_tyreStintsVisual', {
length: 8,
type: 'uint8',
});
if (packetFormat >= 2022) {
this.array('m_tyreStintsEndLaps', {
length: 8,
type: 'uint8',
});
}
}
}
exports.FinalClassificationDataParser = FinalClassificationDataParser;