mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-12 00:58:12 +01:00
feat(blackbox): the cab panel as fits the vehicle, every switch the driver worked in the events
- The rest of the cab record is read when written: what drives the vehicle, the doors' permits and departure signal, the brakes of the whole train, a diesel's oil and temperatures, the cruise control and the rest. - Cab panel: the traction as fits what drives the vehicle (voltage and current of an electric one; revolutions, oil pressure and temperatures of a diesel; clutch or torque converter of a mechanical or hydraulic one; nothing for a draisine), the equalizing reservoir, the main reservoir pipe and the most braked cylinder of the train, the brakes' setting and mode, a group of the doors, the pumps of a diesel where an electric vehicle has its pantographs, the hand brake, the releaser, the horn's tone, the radio's channel, the integrated handle of a unit. - Events: every switch on and off, doors opened and closed, the departure signal, the hand brake, the brakes' setting, the radio channel, the cruise control's speed; moving with the doors open and an overheating engine as faults. - A vehicle with no lamps at an end (a draisine) is not judged on its lights, and one which never had a voltage shows none.
This commit is contained in:
@@ -108,7 +108,8 @@ internal sealed class BlackBoxFile
|
||||
float target = 40, float nextLimit = -1, float nextDistance = -1, float brakeCylinder = 0,
|
||||
uint devices = 0x0007, bool extended = true, sbyte cabEnd = 1, byte security = 0,
|
||||
float lateral = 0.2f, ushort lightsHead = 0x15, ushort lightsTail = 0x22, byte? movement = null,
|
||||
short hintHead = -1, short hintTail = -1, ushort? equippedHead = null, ushort? equippedTail = null) =>
|
||||
short hintHead = -1, short hintTail = -1, ushort? equippedHead = null, ushort? equippedTail = null,
|
||||
byte? engine = null, float oilTemperature = 70) =>
|
||||
Record(0x20, w =>
|
||||
{
|
||||
w.Write(time);
|
||||
@@ -159,6 +160,28 @@ internal sealed class BlackBoxFile
|
||||
{
|
||||
w.Write(head);
|
||||
w.Write(equippedTail ?? head);
|
||||
// what drives it and the rest: a recording made before them ends above
|
||||
if (engine is { } kind2)
|
||||
{
|
||||
w.Write(kind2);
|
||||
w.Write((byte)2); // brake setting P
|
||||
w.Write((byte)3); // radio channel
|
||||
w.Write(4.8f); // equalizing reservoir
|
||||
w.Write(8.0f); // main reservoir pipe
|
||||
w.Write(0.45f); // oil pressure
|
||||
w.Write(75.0f); // water
|
||||
w.Write(oilTemperature);
|
||||
w.Write(80.0f); // engine
|
||||
w.Write(0.0f); // cruise control
|
||||
w.Write(900.0f); // power
|
||||
w.Write((sbyte)0); // hand brake
|
||||
w.Write((byte)1); // brake mode
|
||||
w.Write((byte)0); // horn
|
||||
w.Write(0.5f); // integrated controller
|
||||
w.Write(1.0f); // clutch
|
||||
w.Write(0.0f); // torque converter
|
||||
w.Write(2.5f); // the highest brake cylinder of the train
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user