Exemplo n.º 1
0
 private void DataProcessor_OnDataProcessed(TelemetryDatapool datapool)
 {
     Dispatcher.BeginInvoke(new Action(() =>
     {
         testLabel.Content  = datapool.car.Gear;
         TestRect.Width     = datapool.car.RPMPercentage * rectWidth;
         SpeedLabel.Content = (int)(datapool.car.Speed * 3.6);
     }));
 }
Exemplo n.º 2
0
        //protected void writeDriverValues(Driver driver, CodemastersData.DirtRallyPacket data)
        //{
        //    driver.LapTimeCurrent = data.TimeCurrentLap;
        //}

        //protected void writeSessionValues(Session session, CodemastersData.DirtRallyPacket data)
        //{
        //}

        internal override void InitValues(TelemetryDatapool datapool)
        {
            datapool.InitValues(
                TelemetryValues.Car.PowerTrain.Gear,
                TelemetryValues.Car.PowerTrain.RPM,
                TelemetryValues.Car.PowerTrain.RPMMax,
                TelemetryValues.Car.PowerTrain.RPMPercentage,
                TelemetryValues.Car.Physics.Speed,
                TelemetryValues.Car.Fuel.FuelLevel,
                TelemetryValues.Car.Fuel.FuelPercentage,
                TelemetryValues.Car.Fuel.FuelCapacity
                );
        }
Exemplo n.º 3
0
 internal abstract void WriteValuesIntoDatapool(T dataStructure, TelemetryDatapool datapool);
Exemplo n.º 4
0
 /* specific implementation per data structure */
 internal abstract void InitValues(TelemetryDatapool datapool);
Exemplo n.º 5
0
 internal override void WriteValuesIntoDatapool(Games.Codemasters.ExtraData3 dataStructure, TelemetryDatapool datapool)
 {
     writeCarValues(datapool.car, dataStructure);
 }
        internal override void WriteValuesIntoDatapool(Games.R3E.Data.Structure dataStructure, TelemetryDatapool datapool)
        {
            datapool.car.Gear  = dataStructure.Gear;
            datapool.car.Speed = dataStructure.CarSpeed;

            datapool.car.RPM    = dataStructure.EngineRps;
            datapool.car.RPMMax = dataStructure.MaxEngineRps;
            datapool.car.CalculateRPMPercentage();

            datapool.car.FuelLevel    = dataStructure.FuelLeft;
            datapool.car.FuelCapacity = dataStructure.FuelCapacity;
            datapool.car.CalculateFuelPercentage();
        }
Exemplo n.º 7
0
 internal override void WriteValuesIntoDatapool(Structure dataStructure, TelemetryDatapool datapool)
 {
     WriteCarValues(dataStructure, datapool.car);
 }