Update the config block with new fields.

master
Glenn Maynard 6 years ago
parent 195cba96ec
commit f35f596cee
  1. 13
      sdk/SMX.h
  2. 11
      smx-config/SMX.cs

@ -256,13 +256,22 @@ struct SMXConfig
// The default color to set the platform LED strip to. // The default color to set the platform LED strip to.
uint8_t platformStripColor[3]; 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 // 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 // as we add fields, so the ABI doesn't change. Applications should leave
// any data in here unchanged when calling SMX_SetConfig. // any data in here unchanged when calling SMX_SetConfig.
uint8_t padding[124]; uint8_t padding[120];
}; };
#pragma pack(pop) #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"); static_assert(sizeof(SMXConfig) == 250, "Expected 250 bytes");
// The values (except for Off) correspond with the protocol and must not be changed. // The values (except for Off) correspond with the protocol and must not be changed.

@ -103,8 +103,17 @@ namespace SMX
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
public Byte[] platformStripColor; 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. // Pad this struct to exactly 250 bytes.
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 124)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 120)]
public Byte[] padding; public Byte[] padding;
// enabledSensors is a mask of which panels are enabled. Return this as an array // enabledSensors is a mask of which panels are enabled. Return this as an array

Loading…
Cancel
Save