summaryrefslogtreecommitdiff
path: root/modules/sensors/dynamic_sensor/HidRawSensor.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sensors/dynamic_sensor/HidRawSensor.h')
-rw-r--r--modules/sensors/dynamic_sensor/HidRawSensor.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/modules/sensors/dynamic_sensor/HidRawSensor.h b/modules/sensors/dynamic_sensor/HidRawSensor.h
index 2dd32b61..0989651f 100644
--- a/modules/sensors/dynamic_sensor/HidRawSensor.h
+++ b/modules/sensors/dynamic_sensor/HidRawSensor.h
@@ -121,6 +121,14 @@ private:
// helper function to find sensor control feature usage from packets
bool findSensorControlUsage(const std::vector<HidParser::ReportPacket> &packets);
+ // try to parse sensor description feature value to see if it matches any
+ // known sensors
+ void detectSensorFromDescription(const std::string &description);
+
+ // try to parse sensor description feature value to see if it matches the
+ // Android header tracker sensor
+ bool detectAndroidHeadTrackerSensor(const std::string &description);
+
// try to parse sensor description feature value to see if it matches
// android specified custom sensor definition.
bool detectAndroidCustomSensor(const std::string &description);
@@ -137,14 +145,20 @@ private:
// Features for control sensor
int mReportingStateId;
- unsigned int mReportingStateOffset;
+ unsigned int mReportingStateBitOffset;
+ unsigned int mReportingStateBitSize;
+ int mReportingStateDisableIndex;
+ int mReportingStateEnableIndex;
int mPowerStateId;
- unsigned int mPowerStateOffset;
+ unsigned int mPowerStateBitOffset;
+ unsigned int mPowerStateBitSize;
+ int mPowerStateOffIndex;
+ int mPowerStateOnIndex;
int mReportIntervalId;
- unsigned int mReportIntervalOffset;
- unsigned int mReportIntervalSize;
+ unsigned int mReportIntervalBitOffset;
+ unsigned int mReportIntervalBitSize;
// Input report translate table
std::vector<ReportTranslateRecord> mTranslateTable;