Exemplo n.º 1
0
        void m_IgnitionMaps_onCellLocked(object sender, IgnitionMaps.IgnitionmapChangedEventArgs e)
        {
            // a cell is locked...
            // set locked in the lock-ignition map

            if (sndplayer != null)
            {
                if (m_appSettings.PlayCellProcessedSound)
                {
                    string sound2play = Application.StartupPath + "\\ping.wav";
                    if (File.Exists(sound2play))
                    {
                        sndplayer.SoundLocation = sound2play;
                        sndplayer.Play();
                    }
                }
            }
        }
Exemplo n.º 2
0
        void m_IgnitionMaps_onIgnitionmapCellChanged(object sender, IgnitionMaps.IgnitionmapChangedEventArgs e)
        {
            // a value in the main ignition map was "autotuned"
            // seems that we need to adjust a value in the current fuelmap
            if (_ecuConnection.Opened)
            {
                if (m_IgnitionMaps.IsAutoMappingActive)
                {
                    // then go!

                    byte[] write = new byte[2];

                    byte b1 = (byte)(e.Cellvalue / 256);
                    byte b2 = (byte)(e.Cellvalue - (double)(b1 * 256));

                    write[0] = b1;
                    write[1] = b2;
                    //Console.WriteLine("Updating cellindex: " + e.Mapindex.ToString());
                    _ecuConnection.WriteSymbolDataForced(m_trionicFileInformation.GetSymbolAddressSRAM(m_trionicFileInformation.GetIgnitionMap()) + e.Mapindex * 2, 2, write);
                }

            }
        }
Exemplo n.º 3
0
        void ignitionMapRefresh(object sender, IMapViewer.ReadFromSRAMEventArgs e)
        {
            if (sender is IMapViewer)
            {
                IMapViewer mv = (IMapViewer)sender;
                if (m_trionicFile != null)
                {
                    if (m_trionicFile.Exists())
                    {
                        if (m_IgnitionMaps == null)
                        {
                            m_IgnitionMaps = new IgnitionMaps();
                            m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                            m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                            m_IgnitionMaps.TrionicFile = m_trionicFile;
                            m_IgnitionMaps.InitializeMaps();
                        }
                        mv.Map_content = IntArrayToByteArray(m_IgnitionMaps.GetIgnitionLockedMap());
                        mv.ShowTable(mv.X_axisvalues.Length, true);
                    }
                }

            }
        }
Exemplo n.º 4
0
 void mv_onCellLocked(object sender, IMapViewer.CellLockedEventArgs e)
 {
     //TODO: if it is a map that can lock cells, do it
     //<GS-29032011>
     if (sender is IMapViewer)
     {
         IMapViewer mv = (IMapViewer)sender;
         if (mv.Map_name == "Ign_map_0!" || mv.Map_name == "Knock_count_map")
         {
             // lock/unlock ignition lock stuff
             if (m_IgnitionMaps == null)
             {
                 m_IgnitionMaps = new IgnitionMaps();
                 m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                 m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                 m_IgnitionMaps.TrionicFile = m_trionicFile;
                 m_IgnitionMaps.InitializeMaps();
             }
             if (e.Locked) m_IgnitionMaps.LockCell(e.Columnindex, e.Rowindex);
             else m_IgnitionMaps.UnlockCell(e.Columnindex, e.Rowindex);
             mv.Ignition_lock_map = m_IgnitionMaps.GetIgnitionLockedMap();
             mv.ShowTable(mv.X_axisvalues.Length, true);
         }
         else if (mv.Map_name == "FeedbackAFR" || mv.Map_name == "FeedbackvsTargetAFR" || mv.Map_name == "TargetAFR" || mv.Map_name == "Insp_mat!" || mv.Map_name == "Inj_map_0!")
         {
             // lock/unlock AFR lock stuff
             if (m_AFRMaps == null)
             {
                 m_AFRMaps = new AFRMaps();
                 m_AFRMaps.onFuelmapCellChanged += new AFRMaps.FuelmapCellChanged(m_AFRMaps_onFuelmapCellChanged);
                 m_AFRMaps.onIdleFuelmapCellChanged += new AFRMaps.IdleFuelmapCellChanged(m_AFRMaps_onIdleFuelmapCellChanged);
                 m_AFRMaps.onCellLocked += new AFRMaps.CellLocked(m_AFRMaps_onCellLocked);
                 m_AFRMaps.TrionicFile = m_trionicFile;
                 m_AFRMaps.InitializeMaps();
             }
             if (e.Locked) m_AFRMaps.LockCell(e.Columnindex, e.Rowindex);
             else m_AFRMaps.UnlockCell(e.Columnindex, e.Rowindex);
             mv.AFR_lock_map = m_AFRMaps.GetAFRLockedMap();
             if (mv.Map_name == "FeedbackAFR" || mv.Map_name == "FeedbackvsTargetAFR" || mv.Map_name == "TargetAFR")
             {
                 mv.ShowTable(mv.X_axisvalues.Length, true);
             }
             else
             {
                 mv.ShowTable(mv.X_axisvalues.Length, false);
             }
         }
         else if (mv.Map_name == "IdleFeedbackAFR" || mv.Map_name == "IdleFeedbackvsTargetAFR" || mv.Map_name == "IdleTargetAFR" || mv.Map_name == m_trionicFileInformation.GetIdleFuelMap())
         {
             // lock/unlock AFR lock stuff
             if (m_AFRMaps == null)
             {
                 m_AFRMaps = new AFRMaps();
                 m_AFRMaps.onFuelmapCellChanged += new AFRMaps.FuelmapCellChanged(m_AFRMaps_onFuelmapCellChanged);
                 m_AFRMaps.onIdleFuelmapCellChanged += new AFRMaps.IdleFuelmapCellChanged(m_AFRMaps_onIdleFuelmapCellChanged);
                 m_AFRMaps.onCellLocked += new AFRMaps.CellLocked(m_AFRMaps_onCellLocked);
                 m_AFRMaps.TrionicFile = m_trionicFile;
                 m_AFRMaps.InitializeMaps();
             }
             if (e.Locked) m_AFRMaps.IdleLockCell(e.Columnindex, e.Rowindex);
             else m_AFRMaps.IdleUnlockCell(e.Columnindex, e.Rowindex);
             mv.IdleAFR_lock_map = m_AFRMaps.GetIdleAFRLockedMap();
             if (mv.Map_name == "IdleFeedbackAFR" || mv.Map_name == "IdleFeedbackvsTargetAFR" || mv.Map_name == "IdleTargetAFR")
             {
                 mv.ShowTable(mv.X_axisvalues.Length, true);
             }
             else
             {
                 mv.ShowTable(mv.X_axisvalues.Length, false);
             }
         }
     }
 }
Exemplo n.º 5
0
        private void FeedInfoToAFRMaps(double rpm, double tps, double boost, double AFR, double IgnitionAdvance, bool KnockStatus, bool IdleMapActive)
        {
            if (tps == 9999) return; // ignore these readings, tps changed fast

            // failesafe
            if (m_AFRMaps == null)
            {
                m_AFRMaps = new AFRMaps();
                m_AFRMaps.onFuelmapCellChanged += new AFRMaps.FuelmapCellChanged(m_AFRMaps_onFuelmapCellChanged);
                m_AFRMaps.onIdleFuelmapCellChanged += new AFRMaps.IdleFuelmapCellChanged(m_AFRMaps_onIdleFuelmapCellChanged);
                m_AFRMaps.onCellLocked += new AFRMaps.CellLocked(m_AFRMaps_onCellLocked);
                m_AFRMaps.TrionicFile = m_trionicFile;
                m_AFRMaps.InitializeMaps();
            }
            if (m_IgnitionMaps == null)
            {
                m_IgnitionMaps = new IgnitionMaps();
                m_IgnitionMaps.onCellLocked +=new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                m_IgnitionMaps.onIgnitionmapCellChanged +=new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                m_IgnitionMaps.TrionicFile = m_trionicFile;
                m_IgnitionMaps.InitializeMaps();
            }

            if (_autoTuneAllowed  /*|| m_appSettings.DebugMode*/)
            {
                float targetAFR = m_AFRMaps.HandleRealtimeData(rpm, tps, boost, AFR, _idleMapActive);
                ctrlRealtime1.SetValue("TARGETAFR", (double)targetAFR);
            }
            else
            {
                ctrlRealtime1.SetValue("TARGETAFR", (double)m_AFRMaps.GetCurrentTargetAFR(rpm, boost));
            }
            if (!_ignitionIdleActive) // if idle map is active, we DO NOT tune ignition
            {
                m_IgnitionMaps.HandleRealtimeData(rpm, tps, boost, IgnitionAdvance, KnockStatus);
            }
            if (m_AFRMaps.IsAutoMappingActive)
            {
                // in that case, update the realtime control's data
                //TODO: <GS-28102010> afmaken, idle map tonen en updaten indien _idleMapActive true is
                ctrlRealtime1.UpdateMutatedFuelMap(m_AFRMaps.GetCurrentlyMutatedFuelMap(), m_AFRMaps.GetCurrentlyMutatedFuelMapCounter());
                ctrlRealtime1.UpdateFeedbackAFR(m_AFRMaps.GetFeedbackAFRMap(), m_AFRMaps.GetTargetAFRMap(), m_AFRMaps.GetAFRCountermap());
            }
            if (m_IgnitionMaps.IsAutoMappingActive)
            {
                // update ignition maps in UI
                ctrlRealtime1.UpdateMutatedIgnitionMap(m_IgnitionMaps.GetCurrentlyMutatedIgnitionMap(), m_IgnitionMaps.GetCurrentlyMutatedIgnitionMapCounter(), m_IgnitionMaps.GetIgnitionLockedMap());
            }
            ctrlRealtime1.RedoGrids();
        }
Exemplo n.º 6
0
        private void ctrlRealtime1_onSwitchIgnitionTuningOnOff(object sender, ctrlRealtime.ClosedLoopOnOffEventArgs e)
        {
            // toggle closed loop on /off based on e.SwitchOn
            //Fastest way to detect cell stability and such is in ECUConnection but we don't want that logic in there.
            //Design decision is to feed the AFRMaps object with the data and have that figure out what to do.
            // DO NOT support T5.2 anymore, because of lack of proper knock detection
            if (!props.IsTrionic55)
            {
                frmInfoBox info = new frmInfoBox("T5.2 is currently not supported for Autotuning Ignition");
                return;
            }

            _ecuConnection.StopECUMonitoring();
            Thread.Sleep(10);
            if (m_IgnitionMaps == null)
            {
                m_IgnitionMaps = new IgnitionMaps();
                m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                m_IgnitionMaps.TrionicFile = m_trionicFile;
                m_IgnitionMaps.InitializeMaps();
            }

            byte[] pgm_mod = _ecuConnection.ReadSymbolData(m_trionicFileInformation.GetProgramModeSymbol(), (uint)m_trionicFileInformation.GetSymbolAddressSRAM(m_trionicFileInformation.GetProgramModeSymbol()), (uint)m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetProgramModeSymbol()));
            Thread.Sleep(50);
            // we have to check whether knock detection is turned on, otherwise we DO NOT start ignition autotune

            if (pgm_mod.Length > 3)
            {
                if (!e.SwitchOn)
                {
                    Thread.Sleep(100);
                    // user ended an ignition tuning session.. what todo ?
                    //TODO: ask the user whether he wants to merge the altered fuelmap into ECU memory!
                    // if he replies NO: revert to the previous ignition map (we still need to preserve a copy!)
                    if (MessageBox.Show("Keep adjusted ignition map?", "Question", MessageBoxButtons.YesNo) == DialogResult.No)
                    {
                        _ecuConnection.WriteSymbolDataForced((int)m_trionicFileInformation.GetSymbolAddressSRAM(m_trionicFileInformation.GetIgnitionMap()), (int)m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetIgnitionMap()), IntArrayToByteArray(m_IgnitionMaps.GetOriginalIgnitionmap()));
                    }
                    else
                    {
                        // user selected to keep this map, sync ignition map to the opened binary file! <GS-11042011>
                        byte[] bIgnMap = IntArrayToByteArray(m_IgnitionMaps.GetCurrentlyMutatedIgnitionMap());
                        m_trionicFile.WriteDataNoCounterIncrease(bIgnMap, (uint)m_trionicFileInformation.GetSymbolAddressFlash(m_trionicFileInformation.GetIgnitionMap()));
                    }
                    // init the ignitionmaps values
                    m_IgnitionMaps.InitAutoTuneVars(e.SwitchOn);
                    ctrlRealtime1.SetAutoTuneIgnitionButtonText("Autotune ignition");
                    SetStatusText("Idle");
                }
                else
                {

                    // init the afrmaps values
                    SetStatusText("Starting ignition autotune...");
                    System.Windows.Forms.Application.DoEvents();
                    m_IgnitionMaps.InitAutoTuneVars(e.SwitchOn);
                    byte[] ignitionmap;
                    ignitionmap = _ecuConnection.ReadSymbolData(m_trionicFileInformation.GetIgnitionMap(), (uint)m_trionicFileInformation.GetSymbolAddressSRAM(m_trionicFileInformation.GetIgnitionMap()), (uint)m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetIgnitionMap()));
                    Thread.Sleep(50);

                    // TODO: Check whether there are cells that have more advance than the setting allows
                    if (m_appSettings.CapIgnitionMap) // <GS-05042011> added new option to cap off ignition map before commencing autotune
                    {
                        bool _writeMapToECU = false;
                        for (int i = 0; i < ignitionmap.Length; i += 2)
                        {
                            // get the value from the map
                            int advance = Convert.ToInt32(ignitionmap[i]) * 256 + Convert.ToInt32(ignitionmap[i + 1]);
                            if (advance > 32000) advance = -(65535 - advance);
                            //check against m_appSettings.GlobalMaximumIgnitionAdvance
                            if (advance > m_appSettings.GlobalMaximumIgnitionAdvance * 10)
                            {
                                advance = Convert.ToInt32(m_appSettings.GlobalMaximumIgnitionAdvance * 10);
                                // write into the map and indicate we have to update the map in the ECU
                                byte b1 = (byte)(advance / 256);
                                byte b2 = (byte)(advance - (int)(advance * 256));
                                ignitionmap[i] = b1;
                                ignitionmap[i + 1] = b2;
                                _writeMapToECU = true;
                            }
                        }
                        if (_writeMapToECU)
                        {
                            _ecuConnection.WriteSymbolDataForced(m_trionicFileInformation.GetSymbolAddressSRAM(m_trionicFileInformation.GetIgnitionMap()), m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetIgnitionMap()), ignitionmap);
                            Thread.Sleep(50);
                        }
                    }

                    byte[] knockpressuremap;
                    if (props.IsTrionic55)
                    {
                        knockpressuremap = _ecuConnection.ReadSymbolData("Knock_press_tab!", (uint)m_trionicFileInformation.GetSymbolAddressSRAM("Knock_press_tab!"), (uint)m_trionicFileInformation.GetSymbolLength("Knock_press_tab!"));
                    }
                    else
                    {
                        byte[] knock_press_value = _ecuConnection.ReadSymbolData("Knock_press!", (uint)m_trionicFileInformation.GetSymbolAddressSRAM("Knock_press!"), (uint)m_trionicFileInformation.GetSymbolLength("Knock_press!"));
                        knockpressuremap = new byte[32];
                        for (int i = 0; i < knockpressuremap.Length; i += 2)
                        {
                            knockpressuremap[i] = 0;
                            knockpressuremap[i + 1] = knock_press_value[0];
                        }
                    }
                    Thread.Sleep(50);
                    m_IgnitionMaps.SetKnockPressTab(ByteArrayToIntArray(knockpressuremap));
                    m_IgnitionMaps.SetOriginalIgnitionMap(ByteArrayToIntArray(ignitionmap)); // for reverting back if the user chooses so after the session
                    m_IgnitionMaps.SetCurrentIgnitionMap(ByteArrayToIntArray(ignitionmap)); // for editing & display by autotune functions
                    ctrlRealtime1.SetAutoTuneIgnitionButtonText("Tuning...");
                    SetStatusText("Autotune ignition running...");
                }
                m_IgnitionMaps.CellStableTime_ms = m_appSettings.IgnitionCellStableTime_ms;
                m_IgnitionMaps.MinimumEngineSpeedForIgnitionTuning = m_appSettings.MinimumEngineSpeedForIgnitionTuning;
                m_IgnitionMaps.MaxumimIgnitionAdvancePerSession = m_appSettings.MaximumIgnitionAdvancePerSession;
                m_IgnitionMaps.IgnitionAdvancePerCycle = m_appSettings.IgnitionAdvancePerCycle;
                m_IgnitionMaps.IgnitionRetardFirstKnock = m_appSettings.IgnitionRetardFirstKnock;
                m_IgnitionMaps.IgnitionRetardFurtherKnocks = m_appSettings.IgnitionRetardFurtherKnocks;
                m_IgnitionMaps.GlobalMaximumIgnitionAdvance = m_appSettings.GlobalMaximumIgnitionAdvance;
                m_IgnitionMaps.IsAutoMappingActive = e.SwitchOn;
            }
            else
            {
                // could not read pgm_mod...wtf?
            }
            _ecuConnection.StartECUMonitoring();
        }
Exemplo n.º 7
0
 private void ClearIgnitionLockMap()
 {
     if (m_trionicFile != null)
     {
         if (m_trionicFile.Exists())
         {
             if (m_IgnitionMaps == null)
             {
                 m_IgnitionMaps = new IgnitionMaps();
                 m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                 m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                 m_IgnitionMaps.TrionicFile = m_trionicFile;
                 m_IgnitionMaps.InitializeMaps();
             }
             m_IgnitionMaps.ClearIgnitionLockedMap();
         }
     }
 }
Exemplo n.º 8
0
        private void btnIgnitionLockedMap_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (m_trionicFile != null)
            {
                if (m_trionicFile.Exists())
                {
                    if (m_IgnitionMaps == null)
                    {
                        m_IgnitionMaps = new IgnitionMaps();
                        m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                        m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                        m_IgnitionMaps.TrionicFile = m_trionicFile;
                        m_IgnitionMaps.InitializeMaps();
                    }
                    StartTableViewer("Ign_map_0!"); // adds lock map automatically.

                    //ShowIgnitionMAP("IgnitionLockMap", m_IgnitionMaps.GetIgnitionLockedMap());
                }
            }
        }
Exemplo n.º 9
0
        private void TryToAddOpenLoopTables(IMapViewer mv)
        {
            try
            {
                if (mv.Map_name == m_trionicFileInformation.GetIgnitionMap() || mv.Map_name == m_trionicFileInformation.GetInjectionMap() || mv.Map_name == m_trionicFileInformation.GetInjectionKnockMap() || mv.Map_name == "TargetAFR" || mv.Map_name == "FeedbackAFR" || mv.Map_name == "FeedbackvsTargetAFR" || mv.Map_name == "Adapt_korr" || mv.Map_name == "Adapt_ref" || mv.Map_name == "Knock_count_map"/*|| mv.Map_name == "Ign_map_0!"|| mv.Map_name == "Ign_map_4!"|| mv.Map_name == "Ign_map_2!"|| mv.Map_name == "Tryck_mat!"|| mv.Map_name == "Tryck_mat_a!"*/)
                {
                    Trionic5Properties props = m_trionicFile.GetTrionicProperties();
                    if (props.Lambdacontrol)
                    {
                        byte[] open_loop = m_trionicFile.ReadData((uint)m_trionicFileInformation.GetSymbolAddressFlash(m_trionicFileInformation.GetOpenLoopMap()), (uint)m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetOpenLoopMap()));
                        mv.Open_loop = open_loop;
                        byte[] open_loop_knock = m_trionicFile.ReadData((uint)m_trionicFileInformation.GetSymbolAddressFlash(m_trionicFileInformation.GetOpenLoopKnockMap()), (uint)m_trionicFileInformation.GetSymbolLength(m_trionicFileInformation.GetOpenLoopKnockMap()));
                        mv.Open_loop_knock = open_loop_knock;
                    }
                    // add Turbo_press_tab!
                    if (props.IsTrionic55)
                    {
                        byte[] turbo_press_tab = m_trionicFile.ReadData((uint)m_trionicFileInformation.GetSymbolAddressFlash("Knock_press_tab!"), (uint)m_trionicFileInformation.GetSymbolLength("Knock_press_tab!"));
                        mv.Turbo_press_tab = ByteArrayToIntArray(turbo_press_tab); ;
                    }
                    else
                    {
                        byte[] knock_press_value = m_trionicFile.ReadData((uint)m_trionicFileInformation.GetSymbolAddressFlash("Knock_press!"), (uint)m_trionicFileInformation.GetSymbolLength("Knock_press!"));
                        int[] dummyKnockPress = new int[16];
                        for (int i = 0; i < dummyKnockPress.Length; i++)
                        {
                            dummyKnockPress[i] = Convert.ToInt32(knock_press_value[0]);
                        }
                        mv.Turbo_press_tab = dummyKnockPress;
                    }
                    // add the lock map
                    if (m_IgnitionMaps == null)
                    {
                        //<GS-29032011> always add this stuff.. we just have to
                        m_IgnitionMaps = new IgnitionMaps();
                        m_IgnitionMaps.onIgnitionmapCellChanged += new IgnitionMaps.IgnitionmapCellChanged(m_IgnitionMaps_onIgnitionmapCellChanged);
                        m_IgnitionMaps.onCellLocked += new IgnitionMaps.CellLocked(m_IgnitionMaps_onCellLocked);
                        m_IgnitionMaps.TrionicFile = m_trionicFile;
                        m_IgnitionMaps.InitializeMaps();
            }
                    if (m_IgnitionMaps != null)
                    {
                        mv.Ignition_lock_map = m_IgnitionMaps.GetIgnitionLockedMap();
                    }
                    if (m_AFRMaps != null)
                    {
                        mv.AFR_lock_map = m_AFRMaps.GetAFRLockedMap();
                    }

                    // add knock adaption area
                    // add boost adaption area
                    mv.KnockAdaptionLoadFrom = m_trionicFile.GetSymbolAsInt("Kadapt_load_low!");
                    mv.KnockAdaptionLoadUpto = m_trionicFile.GetSymbolAsInt("Kadapt_load_high!");
                    mv.KnockAdaptionRpmFrom = m_trionicFile.GetSymbolAsInt("Kadapt_rpm_low!") * 10;
                    mv.KnockAdaptionRpmUpto = m_trionicFile.GetSymbolAsInt("Kadapt_rpm_high!") * 10;
                    if (props.AutomaticTransmission)
                    {
                        mv.BoostAdaptionRpmFrom = m_trionicFile.GetAutoRpmLow();
                        mv.BoostAdaptionRpmUpto = m_trionicFile.GetAutoRpmHigh();
                    }
                    else
                    {
                        mv.BoostAdaptionRpmFrom = m_trionicFile.GetManualRpmLow();
                        mv.BoostAdaptionRpmUpto = m_trionicFile.GetManualRpmHigh();
                    }
                    //TODO: add counters as well.
                    //mv.Afr_counter = AFRMapCounterInMemory;
                }
                else if (mv.Map_name == m_trionicFileInformation.GetIdleFuelMap() || mv.Map_name == "IdleTargetAFR" || mv.Map_name == "IdleFeedbackAFR" || mv.Map_name == "IdleFeedbackvsTargetAFR")
                {
                    if (m_AFRMaps != null)
                    {
                        mv.IdleAFR_lock_map = m_AFRMaps.GetIdleAFRLockedMap();
                    }
                }
            }
            catch (Exception E)
            {
                Console.WriteLine(E.Message);
            }
        }