feat(blackbox): the speed of the wheels read from the cab record, shown when they slip or skid

The simulator adds the speed of the wheels at the end of the cab record. It is read when there, and the cab
panel shows it next to the vehicle's speed when the two are a km/h apart or more: the wheels slipping, or
locked in a skid.
This commit is contained in:
maj00r
2026-11-14 00:50:03 +01:00
parent 1398545ff2
commit 7823bb8d09
6 changed files with 35 additions and 3 deletions

View File

@@ -172,6 +172,9 @@ public sealed class BlackBoxReader
Extra = new CabExtra((EngineKind)r.U8(), r.U8(), r.U8(), r.F32(), r.F32(), r.F32(), r.F32(), r.F32(),
r.F32(), r.F32(), r.F32(), r.I8(), r.U8(), r.U8(), r.F32(), r.F32(), r.F32(), r.F32())
};
// The speed of the wheels, later again.
if (sample.Extra is not null && r.Remaining >= 4)
sample = sample with { WheelSpeedKmh = r.F32() };
rec.AddCab(sample);
break;
}