ReadAsDouble() public method

public ReadAsDouble ( ) : double
return double
Exemplo n.º 1
0
        public void ApplyParameter(IniValueObject obj)
        {
            switch(obj.Key)
            {
                case "ShiftDeadSpeed":
                    ShiftDeadSpeed = obj.ReadAsInteger();
                    break;
                case "ShiftDeadTime":
                    ShiftDeadTime = obj.ReadAsInteger();
                    break;

                case "GenerateSpeedHoldoff":
                    speedHoldoff = obj.ReadAsInteger();
                    break;

                case "EnableSportShiftdown":
                    EnableSportShiftdown = obj.ReadAsInteger() == 1;
                    break;

                case "KickdownEnable":
                    KickdownEnable = obj.ReadAsString() == "1";
                    break;
                case "KickdownTimeout":
                    KickdownTimeout = obj.ReadAsDouble();
                    break;
                case "KickdownSpeedReset":
                    KickdownSpeedReset = obj.ReadAsDouble();
                    break;
                case "KickdownPowerReset":
                    KickdownPowerReset = obj.ReadAsDouble();
                    break;
                case "KickdownRpmReset":
                    KickdownRpmReset = obj.ReadAsDouble();
                    break;

                case "PowerShift":
                    PowerShift = obj.ReadAsInteger() == 1;
                    break;

                case "Generate":
                    var def = ShifterTableConfigurationDefault.PeakRpm;
                    GeneratedShiftTable = obj.ReadAsString();
                    switch (GeneratedShiftTable)
                    {
                        case "Economy":
                            def = ShifterTableConfigurationDefault.Economy;
                            break;
                        case "Efficiency":
                            def = ShifterTableConfigurationDefault.Efficiency;
                            break;
                        case "Efficiency2":
                            def = ShifterTableConfigurationDefault.PowerEfficiency;
                            break;
                        case "Opa":
                            def = ShifterTableConfigurationDefault.AlsEenOpa;
                            break;
                        case "PeakRpm":
                            def = ShifterTableConfigurationDefault.PeakRpm;
                            break;
                        case "Performance":
                            def = ShifterTableConfigurationDefault.Performance;
                            break;
                        case "Henk":
                            def = ShifterTableConfigurationDefault.Henk;
                            break;
                    }

                    configuration = new ShifterTableConfiguration(def, Main.Drivetrain, speedHoldoff, StaticMass);
                    break;
            }
        }
Exemplo n.º 2
0
 public void ApplyParameter(IniValueObject obj)
 {
     switch(obj.Key)
     {
         case "MinClutch":
             MinClutch = obj.ReadAsDouble();
             break;
         case "ThrottleSensitivity":
             ThrottleSensitivity = obj.ReadAsDouble();
             break;
     }
 }