Ejemplo n.º 1
0
            public void StartTask(SettingItems item)
            {
                running = true;
                switch (item)
                {
                case SettingItems.ECUSetting:
                    System.Diagnostics.Debug.WriteLine("wait reset0");
                    wait[0].Reset();
                    var ecutask = new ECUSettingTask();
                    this.Store.Device.AddCustomTask("PLCDataLoad1", CancelBit.Storage, ecutask); break;

                case SettingItems.MAPCalibrationParams:
                    System.Diagnostics.Debug.WriteLine("wait reset1");
                    wait[1].Reset();
                    var mTask = new MAPCalibrationParamsTask();
                    this.Store.Device.AddCustomTask("PLCDataLoad2", CancelBit.Storage, mTask); break;

                //case SettingItems.ECUCorrectionParams:
                //    System.Diagnostics.Debug.WriteLine("wait reset2");
                //    wait[2].Reset();
                //    var ecorTask = new ECUCorrectionParamsTask();
                //    this.Store.Device.AddCustomTask("PLCDataLoad3", CancelBit.Storage, ecorTask); break;
                case SettingItems.CorrectionSetting:
                    System.Diagnostics.Debug.WriteLine("wait reset3");
                    wait[2].Reset();
                    var cTask = new CorrectSettingTask();
                    this.Store.Device.AddCustomTask("PLCDataLoad4", CancelBit.Storage, cTask); break;

                //case SettingItems.InjectorCorrection:
                //    System.Diagnostics.Debug.WriteLine("wait reset4");
                //    wait[4].Reset();
                //    var injTask = new InjectorCorrectionSettingTask();
                //    this.Store.Device.AddCustomTask("PLCDataLoad5", CancelBit.Storage, injTask); break;
                case SettingItems.Additional:
                    System.Diagnostics.Debug.WriteLine("wait reset5");
                    wait[3].Reset();
                    var additTask = new AdditionalSettingsTask();
                    this.Store.Device.AddCustomTask("PLCDataLoad6", CancelBit.Storage, additTask); break;

                default:
                    break;
                }
            }
Ejemplo n.º 2
0
            public void StartTasks()
            {
                foreach (var item in wait)
                {
                    item.Reset();
                }
                running = true;
                var ecutask = new ECUSettingTask();

                this.Store.Device.AddCustomTask("PLCDataLoad1", CancelBit.Storage, ecutask);
                var mTask = new MAPCalibrationParamsTask();

                this.Store.Device.AddCustomTask("PLCDataLoad2", CancelBit.Storage, mTask);
                //var ecorTask = new ECUCorrectionParamsTask();
                //this.Store.Device.AddCustomTask("PLCDataLoad3", CancelBit.Storage, ecorTask);
                var cTask = new CorrectSettingTask();

                this.Store.Device.AddCustomTask("PLCDataLoad4", CancelBit.Storage, cTask);
                //var injTask = new InjectorCorrectionSettingTask();
                //this.Store.Device.AddCustomTask("PLCDataLoad5", CancelBit.Storage, injTask);
                var additTask = new AdditionalSettingsTask();

                this.Store.Device.AddCustomTask("PLCDataLoad6", CancelBit.Storage, additTask);
            }