diff --git a/smx-config/DiagnosticsWidgets.cs b/smx-config/DiagnosticsWidgets.cs index 4f20460..c8716c8 100644 --- a/smx-config/DiagnosticsWidgets.cs +++ b/smx-config/DiagnosticsWidgets.cs @@ -147,6 +147,7 @@ namespace smx_config private FrameworkElement NoResponseFromPanel; private FrameworkElement NoResponseFromSensors; private FrameworkElement P1Diagnostics, P2Diagnostics; + private FrameworkElement DIPLabelLeft, DIPLabelRight; public delegate void ShowAllLightsEvent(bool on); public event ShowAllLightsEvent SetShowAllLights; @@ -178,6 +179,9 @@ namespace smx_config // Only show the mode dropdown in debug mode. In regular use, just show calibrated values. DiagnosticMode.Visibility = Helpers.GetDebug()? Visibility.Visible:Visibility.Collapsed; + DIPLabelRight = Template.FindName("DIPLabelRight", this) as FrameworkElement; + DIPLabelLeft = Template.FindName("DIPLabelLeft", this) as FrameworkElement; + Button Recalibrate = Template.FindName("Recalibrate", this) as Button; Recalibrate.Click += delegate(object sender, RoutedEventArgs e) { @@ -251,6 +255,12 @@ namespace smx_config AnySensorsNotResponding = args.controller[SelectedPad].test_data.AnySensorsOnPanelNotResponding(PanelIndex); NoResponseFromSensors.Visibility = AnySensorsNotResponding? Visibility.Visible:Visibility.Collapsed; + // Adjust the DIP labels to match the PCB. + SMX.SMXConfig config = ActivePad.GetFirstActivePadConfig(args); + bool DIPLabelsOnLeft = config.masterVersion < 4; + DIPLabelRight.Visibility = DIPLabelsOnLeft? Visibility.Collapsed:Visibility.Visible; + DIPLabelLeft.Visibility = DIPLabelsOnLeft? Visibility.Visible:Visibility.Collapsed; + // Update the level bar from the test mode data for the selected panel. for(int sensor = 0; sensor < 4; ++sensor) { diff --git a/smx-config/MainWindow.xaml b/smx-config/MainWindow.xaml index 650de3f..b5bb2ec 100644 --- a/smx-config/MainWindow.xaml +++ b/smx-config/MainWindow.xaml @@ -612,32 +612,50 @@ Use if the platform is too sensitive. - - + + + + + - - + + + + + diff --git a/smx-config/Resources/DIP labels.png b/smx-config/Resources/DIP labels.png new file mode 100644 index 0000000..4e1f394 Binary files /dev/null and b/smx-config/Resources/DIP labels.png differ diff --git a/smx-config/SMXConfig.csproj b/smx-config/SMXConfig.csproj index 22c309a..7cebda0 100644 --- a/smx-config/SMXConfig.csproj +++ b/smx-config/SMXConfig.csproj @@ -209,6 +209,9 @@ + + + - + \ No newline at end of file