Skip to content

Commit f123c8f

Browse files
committed
SDO: Remove shake
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent dc3977e commit f123c8f

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

FrameworkSensors/Clients.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ typedef class _SimpleDeviceOrientationDevice : public _ComboDevice
242242
typedef struct _SimpleDeviceOrientationSample
243243
{
244244
FLOAT X;
245-
BOOL Shake;
246245
} SimpleDeviceOrientationSample, *PSimpleDeviceOrientationSample;
247246

248247
SimpleDeviceOrientationSample m_CachedThresholds;

FrameworkSensors/SimpleDeviceOrientationClient.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ typedef enum
3030
{
3131
LINEAR_ACCELEROMETER_DATA_X = 0,
3232
LINEAR_ACCELEROMETER_DATA_TIMESTAMP,
33-
LINEAR_ACCELEROMETER_DATA_SHAKE,
3433
LINEAR_ACCELEROMETER_DATA_COUNT
3534
} LINEAR_ACCELEROMETER_DATA_INDEX;
3635

@@ -174,7 +173,6 @@ SimpleDeviceOrientationDevice::Initialize(
174173

175174
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP] = PKEY_SensorData_Timestamp;
176175
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_X] = PKEY_SensorData_AccelerationX_Gs;
177-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_SHAKE] = PKEY_SensorData_Shake;
178176
}
179177

180178
//
@@ -211,14 +209,9 @@ SimpleDeviceOrientationDevice::Initialize(
211209
m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs;
212210
InitPropVariantFromFloat(0.0, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value));
213211

214-
m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Key = PKEY_SensorData_Shake;
215-
InitPropVariantFromBoolean(FALSE, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value));
216-
217212
m_CachedData.X = 0.0f;
218-
m_CachedData.Shake = FALSE;
219213

220214
m_LastSample.X = 0.0f;
221-
m_LastSample.Shake = FALSE;
222215
}
223216

224217
//
@@ -312,7 +305,7 @@ SimpleDeviceOrientationDevice::Initialize(
312305
WDF_OBJECT_ATTRIBUTES MemoryAttributes;
313306
WDFMEMORY MemoryHandle = NULL;
314307

315-
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT - 2); // Timestamp and shake do not have thresholds
308+
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT - 2); // Timestamp does not have thresholds
316309

317310
MemoryHandle = NULL;
318311
WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
@@ -403,13 +396,9 @@ SimpleDeviceOrientationDevice::GetData(
403396
// update last sample
404397
m_LastSample.X = m_CachedData.X;
405398

406-
m_LastSample.Shake = m_CachedData.Shake;
407-
408399
// push to clx
409400
InitPropVariantFromFloat(m_LastSample.X, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value));
410401

411-
InitPropVariantFromBoolean(m_LastSample.Shake, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value));
412-
413402
GetSystemTimePreciseAsFileTime(&TimeStamp);
414403
InitPropVariantFromFileTime(&TimeStamp, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP].Value));
415404

0 commit comments

Comments
 (0)