From f123c8fd9af2b4dd5044f7d720eccdbc6048a7d3 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 12 Feb 2025 17:48:02 +0800 Subject: [PATCH] SDO: Remove shake Signed-off-by: Daniel Schaefer --- FrameworkSensors/Clients.h | 1 - FrameworkSensors/SimpleDeviceOrientationClient.cpp | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/FrameworkSensors/Clients.h b/FrameworkSensors/Clients.h index 71929cb..b878e1a 100644 --- a/FrameworkSensors/Clients.h +++ b/FrameworkSensors/Clients.h @@ -242,7 +242,6 @@ typedef class _SimpleDeviceOrientationDevice : public _ComboDevice typedef struct _SimpleDeviceOrientationSample { FLOAT X; - BOOL Shake; } SimpleDeviceOrientationSample, *PSimpleDeviceOrientationSample; SimpleDeviceOrientationSample m_CachedThresholds; diff --git a/FrameworkSensors/SimpleDeviceOrientationClient.cpp b/FrameworkSensors/SimpleDeviceOrientationClient.cpp index 8f97b96..13aab7b 100644 --- a/FrameworkSensors/SimpleDeviceOrientationClient.cpp +++ b/FrameworkSensors/SimpleDeviceOrientationClient.cpp @@ -30,7 +30,6 @@ typedef enum { LINEAR_ACCELEROMETER_DATA_X = 0, LINEAR_ACCELEROMETER_DATA_TIMESTAMP, - LINEAR_ACCELEROMETER_DATA_SHAKE, LINEAR_ACCELEROMETER_DATA_COUNT } LINEAR_ACCELEROMETER_DATA_INDEX; @@ -174,7 +173,6 @@ SimpleDeviceOrientationDevice::Initialize( m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP] = PKEY_SensorData_Timestamp; m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_X] = PKEY_SensorData_AccelerationX_Gs; - m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_SHAKE] = PKEY_SensorData_Shake; } // @@ -211,14 +209,9 @@ SimpleDeviceOrientationDevice::Initialize( m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs; InitPropVariantFromFloat(0.0, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value)); - m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Key = PKEY_SensorData_Shake; - InitPropVariantFromBoolean(FALSE, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value)); - m_CachedData.X = 0.0f; - m_CachedData.Shake = FALSE; m_LastSample.X = 0.0f; - m_LastSample.Shake = FALSE; } // @@ -312,7 +305,7 @@ SimpleDeviceOrientationDevice::Initialize( WDF_OBJECT_ATTRIBUTES MemoryAttributes; WDFMEMORY MemoryHandle = NULL; - ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT - 2); // Timestamp and shake do not have thresholds + ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT - 2); // Timestamp does not have thresholds MemoryHandle = NULL; WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes); @@ -403,13 +396,9 @@ SimpleDeviceOrientationDevice::GetData( // update last sample m_LastSample.X = m_CachedData.X; - m_LastSample.Shake = m_CachedData.Shake; - // push to clx InitPropVariantFromFloat(m_LastSample.X, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value)); - InitPropVariantFromBoolean(m_LastSample.Shake, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value)); - GetSystemTimePreciseAsFileTime(&TimeStamp); InitPropVariantFromFileTime(&TimeStamp, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP].Value));