From 501b297c8f40b4569d37acf5733c923d0e4e1a1b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 5 Feb 2019 16:04:30 -0600 Subject: [PATCH] Rename iBadSensorDIP -> iBadJumper. --- sdk/SMX.h | 4 ++-- sdk/Windows/SMXDevice.cpp | 18 +++++++++--------- smx-config/DiagnosticsWidgets.cs | 4 ++-- smx-config/MainWindow.xaml | 2 +- smx-config/SMX.cs | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sdk/SMX.h b/sdk/SMX.h index 968277e..f881013 100644 --- a/sdk/SMX.h +++ b/sdk/SMX.h @@ -287,8 +287,8 @@ struct SMXSensorTestModeData // The DIP switch settings on each panel. This is used for diagnostics displays. int iDIPSwitchPerPanel[9]; - // Bad sensor selection DIP indication for each panel. - bool iBadSensorDIP[9][4]; + // Bad sensor selection jumper indication for each panel. + bool iBadJumper[9][4]; }; #endif diff --git a/sdk/Windows/SMXDevice.cpp b/sdk/Windows/SMXDevice.cpp index f3a4a60..0e085b7 100644 --- a/sdk/Windows/SMXDevice.cpp +++ b/sdk/Windows/SMXDevice.cpp @@ -499,7 +499,7 @@ void SMX::SMXDevice::HandleSensorTestDataResponse(const string &sReadBuffer) memset(output.sensorLevel, 0, sizeof(output.sensorLevel)); memset(output.bBadSensorInput, 0, sizeof(output.bBadSensorInput)); memset(output.iDIPSwitchPerPanel, 0, sizeof(output.iDIPSwitchPerPanel)); - memset(output.iBadSensorDIP, 0, sizeof(output.iBadSensorDIP)); + memset(output.iBadJumper, 0, sizeof(output.iBadJumper)); for(int iPanel = 0; iPanel < 9; ++iPanel) { @@ -518,15 +518,15 @@ void SMX::SMXDevice::HandleSensorTestDataResponse(const string &sReadBuffer) output.bHaveDataFromPanel[iPanel] = true; // These bits are true if that sensor's most recent reading is invalid. - output.bBadSensorInput[iPanel][0] = pad_data.bad_sensor_0; - output.bBadSensorInput[iPanel][1] = pad_data.bad_sensor_1; - output.bBadSensorInput[iPanel][2] = pad_data.bad_sensor_2; - output.bBadSensorInput[iPanel][3] = pad_data.bad_sensor_3; + output.bBadSensorInput[iPanel][0] = false; //pad_data.bad_sensor_0; + output.bBadSensorInput[iPanel][1] = false; //pad_data.bad_sensor_1; + output.bBadSensorInput[iPanel][2] = false; //pad_data.bad_sensor_2; + output.bBadSensorInput[iPanel][3] = false; //pad_data.bad_sensor_3; output.iDIPSwitchPerPanel[iPanel] = pad_data.dip; - output.iBadSensorDIP[iPanel][0] = pad_data.bad_sensor_dip_0; - output.iBadSensorDIP[iPanel][1] = pad_data.bad_sensor_dip_1; - output.iBadSensorDIP[iPanel][2] = pad_data.bad_sensor_dip_2; - output.iBadSensorDIP[iPanel][3] = pad_data.bad_sensor_dip_3; + output.iBadJumper[iPanel][0] = pad_data.bad_sensor_dip_0; + output.iBadJumper[iPanel][1] = pad_data.bad_sensor_dip_1; + output.iBadJumper[iPanel][2] = pad_data.bad_sensor_dip_2; + output.iBadJumper[iPanel][3] = pad_data.bad_sensor_dip_3; for(int iSensor = 0; iSensor < 4; ++iSensor) output.sensorLevel[iPanel][iSensor] = pad_data.sensors[iSensor]; diff --git a/smx-config/DiagnosticsWidgets.cs b/smx-config/DiagnosticsWidgets.cs index d41ec5f..48a008f 100644 --- a/smx-config/DiagnosticsWidgets.cs +++ b/smx-config/DiagnosticsWidgets.cs @@ -55,7 +55,7 @@ namespace smx_config Warning = !args.controller[SelectedPad].test_data.bHaveDataFromPanel[PanelIndex] || args.controller[SelectedPad].test_data.AnySensorsOnPanelNotResponding(PanelIndex) || - args.controller[SelectedPad].test_data.AnyBadDIPSwitchSettingsOnPanel(PanelIndex); + args.controller[SelectedPad].test_data.AnyBadJumpersOnPanel(PanelIndex); }); onConfigChange.RefreshOnInputChange = true; @@ -263,7 +263,7 @@ namespace smx_config AnySensorsNotResponding = args.controller[SelectedPad].test_data.AnySensorsOnPanelNotResponding(PanelIndex); // Don't show both warnings. - HaveIncorrectSensorDIP = !AnySensorsNotResponding && args.controller[SelectedPad].test_data.AnyBadDIPSwitchSettingsOnPanel(PanelIndex); + HaveIncorrectSensorDIP = !AnySensorsNotResponding && args.controller[SelectedPad].test_data.AnyBadJumpersOnPanel(PanelIndex); } NoResponseFromSensors.Visibility = AnySensorsNotResponding? Visibility.Visible:Visibility.Collapsed; BadSensorDIPSwitches.Visibility = HaveIncorrectSensorDIP? Visibility.Visible:Visibility.Collapsed; diff --git a/smx-config/MainWindow.xaml b/smx-config/MainWindow.xaml index c54b1b2..a122048 100644 --- a/smx-config/MainWindow.xaml +++ b/smx-config/MainWindow.xaml @@ -606,7 +606,7 @@ Use if the platform is too sensitive. diff --git a/smx-config/SMX.cs b/smx-config/SMX.cs index e75488f..8c5b8a3 100644 --- a/smx-config/SMX.cs +++ b/smx-config/SMX.cs @@ -230,7 +230,7 @@ namespace SMX public int[] iDIPSwitchPerPanel; [MarshalAs(UnmanagedType.ByValArray, ArraySubType=UnmanagedType.I1, SizeConst = 9*4)] - public bool[] iBadSensorDIP; + public bool[] iBadJumper; public override bool Equals(object obj) { @@ -240,7 +240,7 @@ namespace SMX Helpers.SequenceEqual(sensorLevel, other.sensorLevel) && Helpers.SequenceEqual(bBadSensorInput, other.bBadSensorInput) && Helpers.SequenceEqual(iDIPSwitchPerPanel, other.iDIPSwitchPerPanel) && - Helpers.SequenceEqual(iBadSensorDIP, other.iBadSensorDIP); + Helpers.SequenceEqual(iBadJumper, other.iBadJumper); } // Dummy override to silence a bad warning. We don't use these in containers that need @@ -259,12 +259,12 @@ namespace SMX return false; } - public bool AnyBadDIPSwitchSettingsOnPanel(int panel) + public bool AnyBadJumpersOnPanel(int panel) { if(!bHaveDataFromPanel[panel]) return false; for(int sensor = 0; sensor < 4; ++sensor) - if(iBadSensorDIP[panel*4+sensor]) + if(iBadJumper[panel*4+sensor]) return true; return false;