From f35f596cee328fa913a45703c0a64819f8698127 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 20 Mar 2019 15:13:33 -0500 Subject: [PATCH] Update the config block with new fields. --- sdk/SMX.h | 13 +++++++++++-- smx-config/SMX.cs | 11 ++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/sdk/SMX.h b/sdk/SMX.h index 587d18c..1336e77 100644 --- a/sdk/SMX.h +++ b/sdk/SMX.h @@ -256,13 +256,22 @@ struct SMXConfig // The default color to set the platform LED strip to. uint8_t platformStripColor[3]; + // The maximum tare value to calibrate to (except on startup). + uint16_t autoCalibrationMaxTare; + + // Which panels to enable auto-lighting for. Disabled panels will be unlit. + // 0x01 = panel 0, 0x02 = panel 1, 0x04 = panel 2, etc. This only affects + // the master controller's built-in auto lighting and not lights data send + // from the SDK. + uint16_t autoLightPanelMask; + // Pad the struct to 250 bytes. This keeps this struct size from changing // as we add fields, so the ABI doesn't change. Applications should leave // any data in here unchanged when calling SMX_SetConfig. - uint8_t padding[124]; + uint8_t padding[120]; }; #pragma pack(pop) -static_assert(offsetof(SMXConfig, padding) == 126, "Incorrect padding alignment"); +static_assert(offsetof(SMXConfig, padding) == 130, "Incorrect padding alignment"); static_assert(sizeof(SMXConfig) == 250, "Expected 250 bytes"); // The values (except for Off) correspond with the protocol and must not be changed. diff --git a/smx-config/SMX.cs b/smx-config/SMX.cs index 621010c..621e2b6 100644 --- a/smx-config/SMX.cs +++ b/smx-config/SMX.cs @@ -103,8 +103,17 @@ namespace SMX [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public Byte[] platformStripColor; + // The maximum tare value to calibrate to (except on startup). + public UInt16 autoCalibrationMaxTare; + + // Which panels to enable auto-lighting for. Disabled panels will be unlit. + // 0x01 = panel 0, 0x02 = panel 1, 0x04 = panel 2, etc. This only affects + // the master controller's built-in auto lighting and not lights data send + // from the SDK. + public UInt16 autoLightPanelMask; + // Pad this struct to exactly 250 bytes. - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 124)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 120)] public Byte[] padding; // enabledSensors is a mask of which panels are enabled. Return this as an array