static void Main(string[] args) { Initialized = false; Thread FormThread = new Thread(RunForms); FormThread.SetApartmentState(ApartmentState.STA); FormThread.IsBackground = false; FormThread.Start(); while (!Initialized) { Thread.Sleep(10); } ECUMonitor = new EngineMonitor(); EngineData EData = new EngineData(); AxisParameters.Init(EData, ECUMonitor); Datas = new EditableData[] { EData, new VolumetricEfficiencyMap(EData), new MassAirFlowMap(EData), new FuelMap(EData), new IgnitionAdvanceMap(EData), new LoadLimiter(EData), }; SetEditable(Datas); }
public static void Init(EngineData EData, IMonitor Mon) { RPM.Init(0, EData.RevLimit, 250, Mon.GetRPM); EngineLoad.Init(0, 100, 5, Mon.GetEngineLoad); GearboxGear.Init(0, 7, 1, Mon.GetCurrentGear); MAP.Init(0, 3, 0.1, Mon.GetCurrentMAP); MAF.Init(0, 140, 5, Mon.GetCurrentMAF); }
public IgnitionAdvanceMap(EngineData EngineData) : base(EditMode.Grid, AxisParameters.RPM, AxisParameters.EngineLoad) { ValueName = "Spark advance [° before TDC]"; DefaultValue = 0.0; TopLeft = 10; BottomLeft = -10; TopRight = 10; BottomRight = 10; }
public LoadLimiter(EngineData EngineData) : base(EditMode.Grid, AxisParameters.RPM, AxisParameters.GearboxGear) { //XName = "Engine speed [RPM]"; //YName = "Gearbox gear"; ValueName = "Engine load limit [% of max load]"; DefaultValue = 100.0; TopLeft = 100; BottomLeft = 100; TopRight = 100; BottomRight = 100; }
public MassAirFlowMap(EngineData EngineData) : base(EditMode.Grid, AxisParameters.RPM, AxisParameters.MAF) { this.EngineData = EngineData; //XName = "Engine speed [RPM]"; //YName = "Engine load [%]"; ValueName = "Target A/F"; DefaultValue = 10.0; TopLeft = 14; BottomLeft = 14; TopRight = 11; BottomRight = 11; }
public VolumetricEfficiencyMap(EngineData EngineData) : base(EditMode.Grid, AxisParameters.RPM, AxisParameters.MAP) { this.EngineData = EngineData; //XName = "Engine speed [RPM]"; //YName = "Engine load [%]"; ValueName = "Volumetric Efficiency [%]"; DefaultValue = 10.0; TopLeft = 90; BottomLeft = 20; TopRight = 95; BottomRight = 50; }