Reworked the GapToLeader metrics
This commit is contained in:
+2
-8
@@ -94,16 +94,13 @@ namespace Test_Merge
|
||||
{
|
||||
// A switch would be prettier but I dont think its supported in this C# version
|
||||
if (w is DriverNameWindow)
|
||||
//result.Name = (string)await (w as DriverNameWindow).DecodePng(driverList);
|
||||
result.Name = "Unknown";
|
||||
result.Name = (string)await (w as DriverNameWindow).DecodePng(driverList);
|
||||
if (w is DriverDrsWindow)
|
||||
result.DRS = (bool)await (w as DriverDrsWindow).DecodePng();
|
||||
if (w is DriverGapToLeaderWindow)
|
||||
//result.GapToLeader = (int)await (w as DriverGapToLeaderWindow).DecodePng();
|
||||
result.GapToLeader = 0;
|
||||
result.GapToLeader = (int)await (w as DriverGapToLeaderWindow).DecodePng();
|
||||
if (w is DriverLapTimeWindow)
|
||||
result.LapTime = (int)await (w as DriverLapTimeWindow).DecodePng();
|
||||
//result.LapTime = 0;
|
||||
if (w is DriverPositionWindow)
|
||||
result.Position = (int)await (w as DriverPositionWindow).DecodePng();
|
||||
if (w is DriverSectorWindow)
|
||||
@@ -111,13 +108,10 @@ namespace Test_Merge
|
||||
sectorCount++;
|
||||
if (sectorCount == 1)
|
||||
result.Sector1 = (int)await (w as DriverSectorWindow).DecodePng();
|
||||
//result.Sector1 = 0;
|
||||
if (sectorCount == 2)
|
||||
result.Sector2 = (int)await (w as DriverSectorWindow).DecodePng();
|
||||
//result.Sector2 = 0;
|
||||
if (sectorCount == 3)
|
||||
result.Sector3 = (int)await (w as DriverSectorWindow).DecodePng();
|
||||
//result.Sector3 = 0;
|
||||
}
|
||||
if (w is DriverTyresWindow)
|
||||
//result.CurrentTyre = (Tyre)await (w as DriverTyresWindow).DecodePng();
|
||||
|
||||
Reference in New Issue
Block a user