From 90d50cffb20f1e999392b7e245035dcf6e2a21f4 Mon Sep 17 00:00:00 2001 From: Philipp Trulson Date: Thu, 22 Oct 2020 22:14:11 +0200 Subject: [PATCH] Show disqualified drivers --- static/index.html | 4 ++-- static/js/telemetry.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/static/index.html b/static/index.html index d885c1f..0990731 100644 --- a/static/index.html +++ b/static/index.html @@ -165,8 +165,8 @@
Misc:
- {{ driver.LapData.PitStatus == 0 || driver.LapData.ResultStatus == 6 || driver.LapData.ResultStatus == 7 ? '' : '⛽' }} - {{ driver.LapData.ResultStatus == 6 || driver.LapData.ResultStatus == 7 ? 'DNF' : driver.LapData.CarPosition }} + {{ driver.LapData.PitStatus == 0 || driver.LapData.ResultStatus == 4 || driver.LapData.ResultStatus == 6 || driver.LapData.ResultStatus == 7 ? '' : '⛽' }} + {{ PositionOrResult(driver.LapData.ResultStatus, driver.LapData.CarPosition) }} {{ driver.Name }} diff --git a/static/js/telemetry.js b/static/js/telemetry.js index acbd7d8..5e51e33 100644 --- a/static/js/telemetry.js +++ b/static/js/telemetry.js @@ -230,6 +230,15 @@ var telemetry = new Vue({ return "" } }, + PositionOrResult(status, pos) { + if (status == 6 || status == 7) { + return "DNF" + } + if (status == 4) { + return "DSQ" + } + return pos + }, GridPosDiff(pos, grid) { if ((pos - grid) > 0) { return '▼'