Skip to content

Commit 0e1c71e

Browse files
Merge pull request #5 from FrameworkComputer/rename-linear
Rename linear
2 parents 8b5d01c + 7a9083b commit 0e1c71e

5 files changed

Lines changed: 84 additions & 83 deletions

File tree

FrameworkSensors/linearaccelerometerclient.cpp renamed to FrameworkSensors/AccelerometerClient.cpp

Lines changed: 71 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,32 @@
1111
#include "Clients.h"
1212
#include "EcCommunication.h"
1313

14-
#include "LinearAccelerometerClient.tmh"
14+
#include "AccelerometerClient.tmh"
1515

16-
#define SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER '2CaL'
16+
#define SENSORV2_POOL_TAG_ACCELEROMETER '2CaL'
1717

18-
#define LinearAccelerometerDevice_Default_MinDataInterval (4)
19-
#define LinearAccelerometerDevice_Default_Axis_Threshold (1.0f)
20-
#define LinearAccelerometerDevice_Axis_Resolution (4.0f / 65536.0f) // in delta g
21-
#define LinearAccelerometerDevice_Axis_Minimum (-2.0f) // in g
22-
#define LinearAccelerometerDevice_Axis_Maximum (2.0f) // in g
18+
#define AccelerometerDevice_Default_MinDataInterval (4)
19+
#define AccelerometerDevice_Default_Axis_Threshold (1.0f)
20+
#define AccelerometerDevice_Axis_Resolution (4.0f / 65536.0f) // in delta g
21+
#define AccelerometerDevice_Axis_Minimum (-2.0f) // in g
22+
#define AccelerometerDevice_Axis_Maximum (2.0f) // in g
2323

24-
// Linear Accelerometer Unique ID
24+
// TODO: New GUID for this?
25+
// Accelerometer Unique ID
2526
// {2BAAA1A7-6795-42A0-B830-82526CFD28D1}
26-
DEFINE_GUID(GUID_LinearAccelerometerDevice_UniqueID,
27+
DEFINE_GUID(GUID_AccelerometerDevice_UniqueID,
2728
0x2baaa1a7, 0x6795, 0x42a0, 0xb8, 0x30, 0x82, 0x52, 0x6c, 0xfd, 0x28, 0xd1);
2829

2930
// Sensor data
3031
typedef enum
3132
{
32-
LINEAR_ACCELEROMETER_DATA_X = 0,
33-
LINEAR_ACCELEROMETER_DATA_Y,
34-
LINEAR_ACCELEROMETER_DATA_Z,
35-
LINEAR_ACCELEROMETER_DATA_TIMESTAMP,
36-
LINEAR_ACCELEROMETER_DATA_SHAKE,
37-
LINEAR_ACCELEROMETER_DATA_COUNT
38-
} LINEAR_ACCELEROMETER_DATA_INDEX;
33+
ACCELEROMETER_DATA_X = 0,
34+
ACCELEROMETER_DATA_Y,
35+
ACCELEROMETER_DATA_Z,
36+
ACCELEROMETER_DATA_TIMESTAMP,
37+
ACCELEROMETER_DATA_SHAKE,
38+
ACCELEROMETER_DATA_COUNT
39+
} ACCELEROMETER_DATA_INDEX;
3940

4041
//------------------------------------------------------------------------------
4142
// Function: Initialize
@@ -50,7 +51,7 @@ typedef enum
5051
// NTSTATUS code
5152
//------------------------------------------------------------------------------
5253
NTSTATUS
53-
LinearAccelerometerDevice::Initialize(
54+
AccelerometerDevice::Initialize(
5455
_In_ WDFDEVICE Device,
5556
_In_ SENSOROBJECT SensorInstance
5657
)
@@ -110,7 +111,7 @@ LinearAccelerometerDevice::Initialize(
110111
MemoryAttributes.ParentObject = SensorInstance;
111112
Status = WdfMemoryCreate(&MemoryAttributes,
112113
PagedPool,
113-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
114+
SENSORV2_POOL_TAG_ACCELEROMETER,
114115
Size,
115116
&MemoryHandle,
116117
(PVOID*)&m_pEnumerationProperties);
@@ -141,7 +142,7 @@ LinearAccelerometerDevice::Initialize(
141142
&(m_pEnumerationProperties->List[SENSOR_CONNECTION_TYPE].Value));
142143

143144
m_pEnumerationProperties->List[SENSOR_PERSISTENT_UNIQUEID].Key = DEVPKEY_Sensor_PersistentUniqueId;
144-
InitPropVariantFromCLSID(GUID_LinearAccelerometerDevice_UniqueID,
145+
InitPropVariantFromCLSID(GUID_AccelerometerDevice_UniqueID,
145146
&(m_pEnumerationProperties->List[SENSOR_PERSISTENT_UNIQUEID].Value));
146147

147148
m_pEnumerationProperties->List[SENSOR_ISPRIMARY].Key = DEVPKEY_Sensor_IsPrimary;
@@ -155,14 +156,14 @@ LinearAccelerometerDevice::Initialize(
155156
{
156157
WDF_OBJECT_ATTRIBUTES MemoryAttributes;
157158
WDFMEMORY MemoryHandle = NULL;
158-
ULONG Size = SENSOR_PROPERTY_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT);
159+
ULONG Size = SENSOR_PROPERTY_LIST_SIZE(ACCELEROMETER_DATA_COUNT);
159160

160161
MemoryHandle = NULL;
161162
WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
162163
MemoryAttributes.ParentObject = SensorInstance;
163164
Status = WdfMemoryCreate(&MemoryAttributes,
164165
PagedPool,
165-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
166+
SENSORV2_POOL_TAG_ACCELEROMETER,
166167
Size,
167168
&MemoryHandle,
168169
(PVOID*)&m_pSupportedDataFields);
@@ -173,13 +174,13 @@ LinearAccelerometerDevice::Initialize(
173174
}
174175

175176
SENSOR_PROPERTY_LIST_INIT(m_pSupportedDataFields, Size);
176-
m_pSupportedDataFields->Count = LINEAR_ACCELEROMETER_DATA_COUNT;
177+
m_pSupportedDataFields->Count = ACCELEROMETER_DATA_COUNT;
177178

178-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP] = PKEY_SensorData_Timestamp;
179-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_X] = PKEY_SensorData_AccelerationX_Gs;
180-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_Y] = PKEY_SensorData_AccelerationY_Gs;
181-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_Z] = PKEY_SensorData_AccelerationZ_Gs;
182-
m_pSupportedDataFields->List[LINEAR_ACCELEROMETER_DATA_SHAKE] = PKEY_SensorData_Shake;
179+
m_pSupportedDataFields->List[ACCELEROMETER_DATA_TIMESTAMP] = PKEY_SensorData_Timestamp;
180+
m_pSupportedDataFields->List[ACCELEROMETER_DATA_X] = PKEY_SensorData_AccelerationX_Gs;
181+
m_pSupportedDataFields->List[ACCELEROMETER_DATA_Y] = PKEY_SensorData_AccelerationY_Gs;
182+
m_pSupportedDataFields->List[ACCELEROMETER_DATA_Z] = PKEY_SensorData_AccelerationZ_Gs;
183+
m_pSupportedDataFields->List[ACCELEROMETER_DATA_SHAKE] = PKEY_SensorData_Shake;
183184
}
184185

185186
//
@@ -188,15 +189,15 @@ LinearAccelerometerDevice::Initialize(
188189
{
189190
WDF_OBJECT_ATTRIBUTES MemoryAttributes;
190191
WDFMEMORY MemoryHandle = NULL;
191-
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT);
192+
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(ACCELEROMETER_DATA_COUNT);
192193
FILETIME Time = {0};
193194

194195
MemoryHandle = NULL;
195196
WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
196197
MemoryAttributes.ParentObject = SensorInstance;
197198
Status = WdfMemoryCreate(&MemoryAttributes,
198199
PagedPool,
199-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
200+
SENSORV2_POOL_TAG_ACCELEROMETER,
200201
Size,
201202
&MemoryHandle,
202203
(PVOID*)&m_pData);
@@ -207,23 +208,23 @@ LinearAccelerometerDevice::Initialize(
207208
}
208209

209210
SENSOR_COLLECTION_LIST_INIT(m_pData, Size);
210-
m_pData->Count = LINEAR_ACCELEROMETER_DATA_COUNT;
211+
m_pData->Count = ACCELEROMETER_DATA_COUNT;
211212

212-
m_pData->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP].Key = PKEY_SensorData_Timestamp;
213+
m_pData->List[ACCELEROMETER_DATA_TIMESTAMP].Key = PKEY_SensorData_Timestamp;
213214
GetSystemTimePreciseAsFileTime(&Time);
214-
InitPropVariantFromFileTime(&Time, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP].Value));
215+
InitPropVariantFromFileTime(&Time, &(m_pData->List[ACCELEROMETER_DATA_TIMESTAMP].Value));
215216

216-
m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs;
217-
InitPropVariantFromFloat(0.0, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value));
217+
m_pData->List[ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs;
218+
InitPropVariantFromFloat(0.0, &(m_pData->List[ACCELEROMETER_DATA_X].Value));
218219

219-
m_pData->List[LINEAR_ACCELEROMETER_DATA_Y].Key = PKEY_SensorData_AccelerationY_Gs;
220-
InitPropVariantFromFloat(0.0, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_Y].Value));
220+
m_pData->List[ACCELEROMETER_DATA_Y].Key = PKEY_SensorData_AccelerationY_Gs;
221+
InitPropVariantFromFloat(0.0, &(m_pData->List[ACCELEROMETER_DATA_Y].Value));
221222

222-
m_pData->List[LINEAR_ACCELEROMETER_DATA_Z].Key = PKEY_SensorData_AccelerationZ_Gs;
223-
InitPropVariantFromFloat(0.0, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_Z].Value));
223+
m_pData->List[ACCELEROMETER_DATA_Z].Key = PKEY_SensorData_AccelerationZ_Gs;
224+
InitPropVariantFromFloat(0.0, &(m_pData->List[ACCELEROMETER_DATA_Z].Value));
224225

225-
m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Key = PKEY_SensorData_Shake;
226-
InitPropVariantFromBoolean(FALSE, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value));
226+
m_pData->List[ACCELEROMETER_DATA_SHAKE].Key = PKEY_SensorData_Shake;
227+
InitPropVariantFromBoolean(FALSE, &(m_pData->List[ACCELEROMETER_DATA_SHAKE].Value));
227228

228229
m_CachedData.Axis.X = 0.0f;
229230
m_CachedData.Axis.Y = 0.0f;
@@ -240,7 +241,7 @@ LinearAccelerometerDevice::Initialize(
240241
// Sensor Properties
241242
//
242243
{
243-
m_IntervalMs = LinearAccelerometerDevice_Default_MinDataInterval;
244+
m_IntervalMs = AccelerometerDevice_Default_MinDataInterval;
244245

245246
WDF_OBJECT_ATTRIBUTES MemoryAttributes;
246247
WDFMEMORY MemoryHandle = NULL;
@@ -251,7 +252,7 @@ LinearAccelerometerDevice::Initialize(
251252
MemoryAttributes.ParentObject = SensorInstance;
252253
Status = WdfMemoryCreate(&MemoryAttributes,
253254
PagedPool,
254-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
255+
SENSORV2_POOL_TAG_ACCELEROMETER,
255256
Size,
256257
&MemoryHandle,
257258
(PVOID*)&m_pProperties);
@@ -269,15 +270,15 @@ LinearAccelerometerDevice::Initialize(
269270
&(m_pProperties->List[SENSOR_COMMON_PROPERTY_STATE].Value));
270271

271272
m_pProperties->List[SENSOR_COMMON_PROPERTY_MIN_INTERVAL].Key = PKEY_Sensor_MinimumDataInterval_Ms;
272-
InitPropVariantFromUInt32(LinearAccelerometerDevice_Default_MinDataInterval,
273+
InitPropVariantFromUInt32(AccelerometerDevice_Default_MinDataInterval,
273274
&(m_pProperties->List[SENSOR_COMMON_PROPERTY_MIN_INTERVAL].Value));
274275

275276
m_pProperties->List[SENSOR_COMMON_PROPERTY_MAX_DATAFIELDSIZE].Key = PKEY_Sensor_MaximumDataFieldSize_Bytes;
276277
InitPropVariantFromUInt32(CollectionsListGetMarshalledSize(m_pData),
277278
&(m_pProperties->List[SENSOR_COMMON_PROPERTY_MAX_DATAFIELDSIZE].Value));
278279

279280
m_pProperties->List[SENSOR_COMMON_PROPERTY_TYPE].Key = PKEY_Sensor_Type;
280-
InitPropVariantFromCLSID(GUID_SensorType_LinearAccelerometer,
281+
InitPropVariantFromCLSID(GUID_SensorType_Accelerometer3D,
281282
&(m_pProperties->List[SENSOR_COMMON_PROPERTY_TYPE].Value));
282283
}
283284

@@ -294,7 +295,7 @@ LinearAccelerometerDevice::Initialize(
294295
MemoryAttributes.ParentObject = SensorInstance;
295296
Status = WdfMemoryCreate(&MemoryAttributes,
296297
PagedPool,
297-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
298+
SENSORV2_POOL_TAG_ACCELEROMETER,
298299
Size,
299300
&MemoryHandle,
300301
(PVOID*)&m_pDataFieldProperties);
@@ -308,15 +309,15 @@ LinearAccelerometerDevice::Initialize(
308309
m_pDataFieldProperties->Count = SENSOR_DATA_FIELD_PROPERTY_COUNT;
309310

310311
m_pDataFieldProperties->List[SENSOR_RESOLUTION].Key = PKEY_SensorDataField_Resolution;
311-
InitPropVariantFromFloat(LinearAccelerometerDevice_Axis_Resolution,
312+
InitPropVariantFromFloat(AccelerometerDevice_Axis_Resolution,
312313
&(m_pDataFieldProperties->List[SENSOR_RESOLUTION].Value));
313314

314315
m_pDataFieldProperties->List[SENSOR_MIN_RANGE].Key = PKEY_SensorDataField_RangeMinimum;
315-
InitPropVariantFromFloat(LinearAccelerometerDevice_Axis_Minimum,
316+
InitPropVariantFromFloat(AccelerometerDevice_Axis_Minimum,
316317
&(m_pDataFieldProperties->List[SENSOR_MIN_RANGE].Value));
317318

318319
m_pDataFieldProperties->List[SENSOR_MAX_RANGE].Key = PKEY_SensorDataField_RangeMaximum;
319-
InitPropVariantFromFloat(LinearAccelerometerDevice_Axis_Maximum,
320+
InitPropVariantFromFloat(AccelerometerDevice_Axis_Maximum,
320321
&(m_pDataFieldProperties->List[SENSOR_MAX_RANGE].Value));
321322
}
322323

@@ -327,14 +328,14 @@ LinearAccelerometerDevice::Initialize(
327328
WDF_OBJECT_ATTRIBUTES MemoryAttributes;
328329
WDFMEMORY MemoryHandle = NULL;
329330

330-
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(LINEAR_ACCELEROMETER_DATA_COUNT - 2); // Timestamp and shake do not have thresholds
331+
ULONG Size = SENSOR_COLLECTION_LIST_SIZE(ACCELEROMETER_DATA_COUNT - 2); // Timestamp and shake do not have thresholds
331332

332333
MemoryHandle = NULL;
333334
WDF_OBJECT_ATTRIBUTES_INIT(&MemoryAttributes);
334335
MemoryAttributes.ParentObject = SensorInstance;
335336
Status = WdfMemoryCreate(&MemoryAttributes,
336337
PagedPool,
337-
SENSORV2_POOL_TAG_LINEAR_ACCELEROMETER,
338+
SENSORV2_POOL_TAG_ACCELEROMETER,
338339
Size,
339340
&MemoryHandle,
340341
(PVOID*)&m_pThresholds);
@@ -345,23 +346,23 @@ LinearAccelerometerDevice::Initialize(
345346
}
346347

347348
SENSOR_COLLECTION_LIST_INIT(m_pThresholds, Size);
348-
m_pThresholds->Count = LINEAR_ACCELEROMETER_DATA_COUNT - 2;
349+
m_pThresholds->Count = ACCELEROMETER_DATA_COUNT - 2;
349350

350-
m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs;
351-
InitPropVariantFromFloat(LinearAccelerometerDevice_Default_Axis_Threshold,
352-
&(m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_X].Value));
351+
m_pThresholds->List[ACCELEROMETER_DATA_X].Key = PKEY_SensorData_AccelerationX_Gs;
352+
InitPropVariantFromFloat(AccelerometerDevice_Default_Axis_Threshold,
353+
&(m_pThresholds->List[ACCELEROMETER_DATA_X].Value));
353354

354-
m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_Y].Key = PKEY_SensorData_AccelerationY_Gs;
355-
InitPropVariantFromFloat(LinearAccelerometerDevice_Default_Axis_Threshold,
356-
&(m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_Y].Value));
355+
m_pThresholds->List[ACCELEROMETER_DATA_Y].Key = PKEY_SensorData_AccelerationY_Gs;
356+
InitPropVariantFromFloat(AccelerometerDevice_Default_Axis_Threshold,
357+
&(m_pThresholds->List[ACCELEROMETER_DATA_Y].Value));
357358

358-
m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_Z].Key = PKEY_SensorData_AccelerationZ_Gs;
359-
InitPropVariantFromFloat(LinearAccelerometerDevice_Default_Axis_Threshold,
360-
&(m_pThresholds->List[LINEAR_ACCELEROMETER_DATA_Z].Value));
359+
m_pThresholds->List[ACCELEROMETER_DATA_Z].Key = PKEY_SensorData_AccelerationZ_Gs;
360+
InitPropVariantFromFloat(AccelerometerDevice_Default_Axis_Threshold,
361+
&(m_pThresholds->List[ACCELEROMETER_DATA_Z].Value));
361362

362-
m_CachedThresholds.Axis.X = LinearAccelerometerDevice_Default_Axis_Threshold;
363-
m_CachedThresholds.Axis.Y = LinearAccelerometerDevice_Default_Axis_Threshold;
364-
m_CachedThresholds.Axis.Z = LinearAccelerometerDevice_Default_Axis_Threshold;
363+
m_CachedThresholds.Axis.X = AccelerometerDevice_Default_Axis_Threshold;
364+
m_CachedThresholds.Axis.Y = AccelerometerDevice_Default_Axis_Threshold;
365+
m_CachedThresholds.Axis.Z = AccelerometerDevice_Default_Axis_Threshold;
365366

366367
m_FirstSample = TRUE;
367368
}
@@ -387,7 +388,7 @@ LinearAccelerometerDevice::Initialize(
387388
// NTSTATUS code
388389
//------------------------------------------------------------------------------
389390
NTSTATUS
390-
LinearAccelerometerDevice::GetData(
391+
AccelerometerDevice::GetData(
391392
_In_ HANDLE Handle
392393
)
393394
{
@@ -468,14 +469,14 @@ LinearAccelerometerDevice::GetData(
468469
m_LastSample.Shake = m_CachedData.Shake;
469470

470471
// push to clx
471-
InitPropVariantFromFloat(m_LastSample.Axis.X, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_X].Value));
472-
InitPropVariantFromFloat(m_LastSample.Axis.Y, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_Y].Value));
473-
InitPropVariantFromFloat(m_LastSample.Axis.Z, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_Z].Value));
472+
InitPropVariantFromFloat(m_LastSample.Axis.X, &(m_pData->List[ACCELEROMETER_DATA_X].Value));
473+
InitPropVariantFromFloat(m_LastSample.Axis.Y, &(m_pData->List[ACCELEROMETER_DATA_Y].Value));
474+
InitPropVariantFromFloat(m_LastSample.Axis.Z, &(m_pData->List[ACCELEROMETER_DATA_Z].Value));
474475

475-
InitPropVariantFromBoolean(m_LastSample.Shake, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_SHAKE].Value));
476+
InitPropVariantFromBoolean(m_LastSample.Shake, &(m_pData->List[ACCELEROMETER_DATA_SHAKE].Value));
476477

477478
GetSystemTimePreciseAsFileTime(&TimeStamp);
478-
InitPropVariantFromFileTime(&TimeStamp, &(m_pData->List[LINEAR_ACCELEROMETER_DATA_TIMESTAMP].Value));
479+
InitPropVariantFromFileTime(&TimeStamp, &(m_pData->List[ACCELEROMETER_DATA_TIMESTAMP].Value));
479480

480481
SensorsCxSensorDataReady(m_SensorInstance, m_pData);
481482
m_FirstSample = FALSE;
@@ -504,7 +505,7 @@ LinearAccelerometerDevice::GetData(
504505
// NTSTATUS code
505506
//------------------------------------------------------------------------------
506507
NTSTATUS
507-
LinearAccelerometerDevice::UpdateCachedThreshold(
508+
AccelerometerDevice::UpdateCachedThreshold(
508509
)
509510
{
510511
NTSTATUS Status = STATUS_SUCCESS;

FrameworkSensors/Clients.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,29 +206,29 @@ typedef class _AlsDevice : public _ComboDevice
206206

207207

208208
//
209-
// Linear Accelerometer --------------------------------------------------------------
209+
// Accelerometer --------------------------------------------------------------
210210
//
211-
typedef class _LinearAccelerometerDevice : public _ComboDevice
211+
typedef class _AccelerometerDevice : public _ComboDevice
212212
{
213213
private:
214214

215-
typedef struct _LinearAccelerometerSample
215+
typedef struct _AccelerometerSample
216216
{
217217
VEC3D Axis;
218218
BOOL Shake;
219-
} LinearAccelerometerSample, *PLinearAccelerometerSample;
219+
} AccelerometerSample, *PAccelerometerSample;
220220

221-
LinearAccelerometerSample m_CachedThresholds;
222-
LinearAccelerometerSample m_CachedData;
223-
LinearAccelerometerSample m_LastSample;
221+
AccelerometerSample m_CachedThresholds;
222+
AccelerometerSample m_CachedData;
223+
AccelerometerSample m_LastSample;
224224

225225
public:
226226

227227
NTSTATUS Initialize(_In_ WDFDEVICE Device, _In_ SENSOROBJECT SensorObj);
228228
NTSTATUS GetData(_In_ HANDLE Device);
229229
NTSTATUS UpdateCachedThreshold();
230230

231-
} LinearAccelerometerDevice, *PLinearAccelerometerDevice;
231+
} AccelerometerDevice, *PAccelerometerDevice;
232232

233233

234234

FrameworkSensors/Device.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum Device
3434
Device_SimpleDeviceOrientation,
3535
#endif
3636
#if ENABLE_ACCEL_SENSOR
37-
Device_LinearAccelerometer,
37+
Device_Accelerometer,
3838
#endif
3939
// Keep this last
4040
Device_Count
@@ -56,7 +56,7 @@ inline size_t GetDeviceSizeAtIndex(
5656
case Device_SimpleDeviceOrientation:result = sizeof(SimpleDeviceOrientationDevice); break;
5757
#endif
5858
#if ENABLE_ACCEL_SENSOR
59-
case Device_LinearAccelerometer: result = sizeof(LinearAccelerometerDevice); break;
59+
case Device_Accelerometer: result = sizeof(AccelerometerDevice); break;
6060
#endif
6161
default: break; // invalid
6262
}
@@ -77,7 +77,7 @@ void AllocateDeviceAtIndex(
7777
case Device_SimpleDeviceOrientation:*ppDevice = new(*ppDevice) SimpleDeviceOrientationDevice; break;
7878
#endif
7979
#if ENABLE_ACCEL_SENSOR
80-
case Device_LinearAccelerometer: *ppDevice = new(*ppDevice) LinearAccelerometerDevice; break;
80+
case Device_Accelerometer: *ppDevice = new(*ppDevice) AccelerometerDevice; break;
8181
#endif
8282

8383
default: break; // invalid (let driver fail)

0 commit comments

Comments
 (0)