Add disabled combined thresholds.

master
Glenn Maynard 6 years ago
parent 9facc93548
commit 27be716768
  1. 9
      sdk/SMX.h
  2. 5
      smx-config/SMX.cs

@ -163,11 +163,14 @@ struct packed_sensor_settings_t {
uint8_t fsrLowThreshold[4]; uint8_t fsrLowThreshold[4];
uint8_t fsrHighThreshold[4]; uint8_t fsrHighThreshold[4];
uint16_t combinedLowThreshold;
uint16_t combinedHighThreshold;
// This must be left unchanged. // This must be left unchanged.
uint16_t reserved; uint16_t reserved;
}; };
static_assert(sizeof(packed_sensor_settings_t) == 12, "Incorrect packed_sensor_settings_t size"); static_assert(sizeof(packed_sensor_settings_t) == 16, "Incorrect packed_sensor_settings_t size");
// The configuration for a connected controller. This can be retrieved with SMX_GetConfig // The configuration for a connected controller. This can be retrieved with SMX_GetConfig
// and modified with SMX_SetConfig. // and modified with SMX_SetConfig.
@ -258,11 +261,11 @@ struct SMXConfig
// 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[85]; uint8_t padding[49];
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(offsetof(SMXConfig, padding) == 165, "Incorrect padding alignment"); static_assert(offsetof(SMXConfig, padding) == 201, "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.

@ -39,6 +39,9 @@ namespace SMX
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public Byte[] fsrHighThreshold; public Byte[] fsrHighThreshold;
public UInt16 combinedLowThreshold;
public UInt16 combinedHighThreshold;
// This must be left unchanged. // This must be left unchanged.
public UInt16 reserved; public UInt16 reserved;
}; };
@ -88,7 +91,7 @@ namespace SMX
public Byte preDetailsDelayMilliseconds; public Byte preDetailsDelayMilliseconds;
// Pad this struct to exactly 250 bytes. // Pad this struct to exactly 250 bytes.
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 85)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 49)]
public Byte[] padding; public Byte[] padding;
// It would be simpler to set flags to [MarshalAs(UnmanagedType.U8)], but // It would be simpler to set flags to [MarshalAs(UnmanagedType.U8)], but

Loading…
Cancel
Save