diff --git a/smx-config/Helpers.cs b/smx-config/Helpers.cs index 590d52a..b8a7964 100644 --- a/smx-config/Helpers.cs +++ b/smx-config/Helpers.cs @@ -64,7 +64,7 @@ namespace smx_config // There aren't any pads connected. Just return a dummy config, since the UI // isn't visible. - return new SMX.SMXConfig(); + return SMX.SMXConfig.Create(); } public static SMX.SMXConfig GetFirstActivePadConfig() diff --git a/smx-config/SMX.cs b/smx-config/SMX.cs index 42fd1d2..1fd8e4f 100644 --- a/smx-config/SMX.cs +++ b/smx-config/SMX.cs @@ -192,6 +192,19 @@ namespace SMX panelThreshold7High = values[7]; panelThreshold8High = values[8]; } + + // Create an empty SMXConfig. + static public SMXConfig Create() + { + SMXConfig result = new SMXConfig(); + result.enabledSensors = new Byte[5]; + result.stepColor = new Byte[3*9]; + result.individualPanelFSRLow = new UInt16[9]; + result.individualPanelFSRHigh = new UInt16[9]; + result.platformStripColor = new Byte[3]; + + return result; + } }; public struct SMXSensorTestModeData