diff --git a/RateAppSource/RateController/Classes/clsProduct.cs b/RateAppSource/RateController/Classes/clsProduct.cs index 0ef84111..f84b2315 100644 --- a/RateAppSource/RateController/Classes/clsProduct.cs +++ b/RateAppSource/RateController/Classes/clsProduct.cs @@ -908,17 +908,10 @@ public bool SerialFromAruduino(string[] words, bool RealNano = true) bool Result = false; // return true if there is good comm try { - if (RealNano && mf.SimMode == SimType.VirtualNano) + if (RateSensor.ParseStringData(words)) { - // block PGN32400 from real nano when simulation is with virtual nano - } - else - { - if (RateSensor.ParseStringData(words)) - { - UpdateUnitsApplied(); - Result = true; - } + UpdateUnitsApplied(); + Result = true; } } catch (Exception) @@ -960,7 +953,7 @@ public double SmoothRate() public double Speed() { double Result = 0; - if (mf.SimMode == SimType.Speed || mf.SectionControl.PrimeOn) + if (mf.SimMode == SimType.Sim_Speed || mf.SectionControl.PrimeOn) { Result = mf.SimSpeed; } @@ -1193,7 +1186,7 @@ public double WorkRate() private double KMH() { double Result = 0; - if (mf.SimMode == SimType.Speed || mf.SectionControl.PrimeOn) + if (mf.SimMode == SimType.Sim_Speed || mf.SectionControl.PrimeOn) { if (mf.UseInches) { diff --git a/RateAppSource/RateController/FormSettings.cs b/RateAppSource/RateController/FormSettings.cs index cff8c329..64cc977c 100644 --- a/RateAppSource/RateController/FormSettings.cs +++ b/RateAppSource/RateController/FormSettings.cs @@ -1702,7 +1702,7 @@ private void UpdateDiags() wifiBar.Value = mf.ModulesStatus.WifiStrength(CurrentProduct.ModuleID); // product name - if (mf.SimMode != SimType.None) + if (mf.SimMode != SimType.Sim_None) { //lbProduct.Text = lbProduct.Text; lbProduct.BackColor = mf.SimColor; @@ -1760,7 +1760,7 @@ private void UpdateForm() SetFanDisplay(false); } - if (mf.SimMode != SimType.None) + if (mf.SimMode != SimType.Sim_None) { lbProduct.BackColor = mf.SimColor; lbProduct.BorderStyle = BorderStyle.FixedSingle; diff --git a/RateAppSource/RateController/FormStart.cs b/RateAppSource/RateController/FormStart.cs index a96af899..40da4cc7 100644 --- a/RateAppSource/RateController/FormStart.cs +++ b/RateAppSource/RateController/FormStart.cs @@ -8,9 +8,8 @@ namespace RateController { public enum SimType { - None, - VirtualNano, - Speed + Sim_None, + Sim_Speed } public partial class FormStart : Form @@ -73,7 +72,7 @@ public partial class FormStart : Form private double cPressureOffset; private bool[] cShowScale = new bool[4]; private bool cShowSwitches = false; - private SimType cSimMode = SimType.None; + private SimType cSimMode = SimType.Sim_None; private double cSimSpeed = 0; private DateTime cStartTime; private int CurrentPage; @@ -301,9 +300,6 @@ public double SimSpeed } } - public DateTime StartTime - { get { return cStartTime; } } - public bool UseDualAuto { get { return cUseDualAuto; } set { cUseDualAuto = value; } } @@ -498,7 +494,7 @@ public void LoadSettings() } else { - cSimMode = SimType.None; + cSimMode = SimType.Sim_None; } if (double.TryParse(Tls.LoadProperty("PrimeTime"), out double ptime)) @@ -752,7 +748,7 @@ public void UpdateStatus() { this.Text = "RC [" + Path.GetFileNameWithoutExtension(Properties.Settings.Default.FileName) + "]"; - if (cSimMode == SimType.Speed || SectionControl.PrimeOn) + if (cSimMode == SimType.Sim_Speed || SectionControl.PrimeOn) { btnSettings.Image = Properties.Resources.SimGear; } diff --git a/RateAppSource/RateController/PGNs/PGN228.cs b/RateAppSource/RateController/PGNs/PGN228.cs index 47e45618..de0e9ca1 100644 --- a/RateAppSource/RateController/PGNs/PGN228.cs +++ b/RateAppSource/RateController/PGNs/PGN228.cs @@ -34,7 +34,7 @@ public int ChannelCount public void ParseByteData(byte[] Data) { - if ((mf.SimMode == SimType.None) && (Data.Length > HeaderCount)) + if ((mf.SimMode == SimType.Sim_None) && (Data.Length > HeaderCount)) { if (Data.Length == Data[4] + HeaderCount + 1) { diff --git a/RateAppSource/RateController/PGNs/PGN235.cs b/RateAppSource/RateController/PGNs/PGN235.cs index 7300ddd0..3523ac07 100644 --- a/RateAppSource/RateController/PGNs/PGN235.cs +++ b/RateAppSource/RateController/PGNs/PGN235.cs @@ -29,7 +29,7 @@ public void ParseByteData(byte[] Data) { bool ValidData = true; int Width; - if ((mf.SimMode == SimType.None) && (Data.Length > 5)) + if ((mf.SimMode == SimType.Sim_None) && (Data.Length > 5)) { if (Data.Length == Data[4] + 6) { diff --git a/RateAppSource/RateController/PGNs/PGN238.cs b/RateAppSource/RateController/PGNs/PGN238.cs index 67f0b7d1..8d3460a7 100644 --- a/RateAppSource/RateController/PGNs/PGN238.cs +++ b/RateAppSource/RateController/PGNs/PGN238.cs @@ -50,7 +50,7 @@ public byte RaiseTime public void ParseByteData(byte[] Data) { - if ((mf.SimMode == SimType.None) && (Data.Length > totalHeaderByteCount)) + if ((mf.SimMode == SimType.Sim_None) && (Data.Length > totalHeaderByteCount)) { if (Data.Length == Data[4] + totalHeaderByteCount + 1) { diff --git a/RateAppSource/RateController/PGNs/PGN239.cs b/RateAppSource/RateController/PGNs/PGN239.cs index 613dd48c..6eb9a35b 100644 --- a/RateAppSource/RateController/PGNs/PGN239.cs +++ b/RateAppSource/RateController/PGNs/PGN239.cs @@ -78,7 +78,7 @@ public bool Connected() public void ParseByteData(byte[] Data) { - if ((mf.SimMode == SimType.None) && (Data.Length > totalHeaderByteCount)) + if ((mf.SimMode == SimType.Sim_None) && (Data.Length > totalHeaderByteCount)) { if (Data.Length == Data[4] + totalHeaderByteCount + 1) { diff --git a/RateAppSource/RateController/PGNs/PGN254.cs b/RateAppSource/RateController/PGNs/PGN254.cs index e0c1794f..ed5c3475 100644 --- a/RateAppSource/RateController/PGNs/PGN254.cs +++ b/RateAppSource/RateController/PGNs/PGN254.cs @@ -55,7 +55,7 @@ public bool Connected() public void ParseByteData(byte[] Data) { - if ((mf.SimMode == SimType.None) && (Data.Length > totalHeaderByteCount)) + if ((mf.SimMode == SimType.Sim_None) && (Data.Length > totalHeaderByteCount)) { if (Data.Length == Data[4] + totalHeaderByteCount + 1) { diff --git a/RateAppSource/RateController/PGNs/PGN32400.cs b/RateAppSource/RateController/PGNs/PGN32400.cs index ec86c57b..acc82566 100644 --- a/RateAppSource/RateController/PGNs/PGN32400.cs +++ b/RateAppSource/RateController/PGNs/PGN32400.cs @@ -65,26 +65,12 @@ public double ElapsedTime() public bool ModuleReceiving() { - if (Prod.mf.SimMode == SimType.VirtualNano) - { - return true; - } - else - { - return cSensorReceiving && ModuleSending(); - } + return cSensorReceiving && ModuleSending(); } public bool ModuleSending() { - if (Prod.mf.SimMode == SimType.VirtualNano) - { - return true; - } - else - { - return ((DateTime.Now - ReceiveTime).TotalSeconds < 4); - } + return ((DateTime.Now - ReceiveTime).TotalSeconds < 4); } public bool ParseByteData(byte[] Data) diff --git a/RateAppSource/RateController/frmCalibrate.cs b/RateAppSource/RateController/frmCalibrate.cs index 18e42599..c7369c83 100644 --- a/RateAppSource/RateController/frmCalibrate.cs +++ b/RateAppSource/RateController/frmCalibrate.cs @@ -41,7 +41,7 @@ public frmCalibrate(FormStart CalledFrom) private void btnCalStart_Click(object sender, EventArgs e) { - mf.SimMode = SimType.Speed; + mf.SimMode = SimType.Sim_Speed; Running = true; SetButtons(); Cals.Running(true); @@ -51,7 +51,7 @@ private void btnCalStart_Click(object sender, EventArgs e) private void btnCalStop_Click(object sender, EventArgs e) { - mf.SimMode = SimType.None; + mf.SimMode = SimType.Sim_None; Running = false; SetButtons(); Cals.Running(false); @@ -118,7 +118,7 @@ private void Cals_Edited(object sender, EventArgs e) private void frmCalibrate_FormClosed(object sender, FormClosedEventArgs e) { mf.Tls.SaveFormData(this); - mf.SimMode = SimType.None; + mf.SimMode = SimType.Sim_None; Cals.Close(); } diff --git a/RateAppSource/RateController/frmLargeScreen.cs b/RateAppSource/RateController/frmLargeScreen.cs index ebe7d0e2..bbb7368d 100644 --- a/RateAppSource/RateController/frmLargeScreen.cs +++ b/RateAppSource/RateController/frmLargeScreen.cs @@ -801,20 +801,10 @@ private void UpdateForm() } // set highlight - if (mf.SimMode == SimType.VirtualNano) - { - pnlSelect0.BackColor = mf.SimColor; - pnlSelect1.BackColor = mf.SimColor; - pnlSelect2.BackColor = mf.SimColor; - pnlSelect3.BackColor = mf.SimColor; - } - else - { - pnlSelect0.BackColor = Properties.Settings.Default.DayColour; - pnlSelect1.BackColor = Properties.Settings.Default.DayColour; - pnlSelect2.BackColor = Properties.Settings.Default.DayColour; - pnlSelect3.BackColor = Properties.Settings.Default.DayColour; - } + pnlSelect0.BackColor = Properties.Settings.Default.DayColour; + pnlSelect1.BackColor = Properties.Settings.Default.DayColour; + pnlSelect2.BackColor = Properties.Settings.Default.DayColour; + pnlSelect3.BackColor = Properties.Settings.Default.DayColour; switch (Prd.ID) { case 0: @@ -977,7 +967,7 @@ private void UpdateForm() lbQuantity.Text = Prd.QuantityDescription; // aog - if (mf.SimMode == SimType.Speed) + if (mf.SimMode == SimType.Sim_Speed) { btnMenu.Image = Properties.Resources.SimGear; } diff --git a/RateAppSource/RateController/frmOptions.cs b/RateAppSource/RateController/frmOptions.cs index ffaaac6a..275507ff 100644 --- a/RateAppSource/RateController/frmOptions.cs +++ b/RateAppSource/RateController/frmOptions.cs @@ -301,11 +301,11 @@ private void Save() if (ckSimSpeed.Checked) { - mf.SimMode = SimType.Speed; + mf.SimMode = SimType.Sim_Speed; } else { - mf.SimMode = SimType.None; + mf.SimMode = SimType.Sim_None; } mf.UseLargeScreen = ckLargeScreen.Checked; @@ -566,7 +566,7 @@ private void UpdateForm(bool UpdateObject = false) ckScreenSwitches.Checked = mf.ShowSwitches; ckWorkSwitch.Checked = mf.SwitchBox.UseWorkSwitch; ckPressure.Checked = mf.ShowPressure; - ckSimSpeed.Checked = (mf.SimMode == SimType.Speed); + ckSimSpeed.Checked = (mf.SimMode == SimType.Sim_Speed); ckDualAuto.Checked = mf.UseDualAuto; ckResume.Checked = mf.ResumeAfterPrime; ckNoMaster.Checked = mf.MasterOverride; diff --git a/RateAppSource/RateController/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/RateAppSource/RateController/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 6a55e5da..73f12b95 100644 Binary files a/RateAppSource/RateController/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/RateAppSource/RateController/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/RateAppSource/RateController/obj/Debug/RateController.exe b/RateAppSource/RateController/obj/Debug/RateController.exe index 443d692a..608cd2b7 100644 Binary files a/RateAppSource/RateController/obj/Debug/RateController.exe and b/RateAppSource/RateController/obj/Debug/RateController.exe differ diff --git a/RateAppSource/RateController/obj/Debug/RateController.pdb b/RateAppSource/RateController/obj/Debug/RateController.pdb index 525b5dda..e34a1716 100644 Binary files a/RateAppSource/RateController/obj/Debug/RateController.pdb and b/RateAppSource/RateController/obj/Debug/RateController.pdb differ diff --git a/RateAppSource/RateController/obj/Debug/de/RateController.resources.dll b/RateAppSource/RateController/obj/Debug/de/RateController.resources.dll index 62e38091..a473e979 100644 Binary files a/RateAppSource/RateController/obj/Debug/de/RateController.resources.dll and b/RateAppSource/RateController/obj/Debug/de/RateController.resources.dll differ diff --git a/RateAppSource/RateController/obj/Debug/nl/RateController.resources.dll b/RateAppSource/RateController/obj/Debug/nl/RateController.resources.dll index 416560f3..5538f07f 100644 Binary files a/RateAppSource/RateController/obj/Debug/nl/RateController.resources.dll and b/RateAppSource/RateController/obj/Debug/nl/RateController.resources.dll differ diff --git a/RateControllerApp/RateController.exe b/RateControllerApp/RateController.exe index 443d692a..608cd2b7 100644 Binary files a/RateControllerApp/RateController.exe and b/RateControllerApp/RateController.exe differ diff --git a/RateControllerApp/de/RateController.resources.dll b/RateControllerApp/de/RateController.resources.dll index 62e38091..a473e979 100644 Binary files a/RateControllerApp/de/RateController.resources.dll and b/RateControllerApp/de/RateController.resources.dll differ diff --git a/RateControllerApp/fr/RateController.resources.dll b/RateControllerApp/fr/RateController.resources.dll index 94932109..dc531741 100644 Binary files a/RateControllerApp/fr/RateController.resources.dll and b/RateControllerApp/fr/RateController.resources.dll differ diff --git a/RateControllerApp/hu/RateController.resources.dll b/RateControllerApp/hu/RateController.resources.dll index f887819e..bdb42f3f 100644 Binary files a/RateControllerApp/hu/RateController.resources.dll and b/RateControllerApp/hu/RateController.resources.dll differ diff --git a/RateControllerApp/nl/RateController.resources.dll b/RateControllerApp/nl/RateController.resources.dll index 416560f3..5538f07f 100644 Binary files a/RateControllerApp/nl/RateController.resources.dll and b/RateControllerApp/nl/RateController.resources.dll differ diff --git a/RateControllerApp/pl/RateController.resources.dll b/RateControllerApp/pl/RateController.resources.dll index ec300a5f..4984034f 100644 Binary files a/RateControllerApp/pl/RateController.resources.dll and b/RateControllerApp/pl/RateController.resources.dll differ diff --git a/RateControllerApp/ru/RateController.resources.dll b/RateControllerApp/ru/RateController.resources.dll index 73350416..4a22fa8d 100644 Binary files a/RateControllerApp/ru/RateController.resources.dll and b/RateControllerApp/ru/RateController.resources.dll differ