summaryrefslogtreecommitdiff
path: root/modules/sensors/dynamic_sensor/HidRawSensor.h
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2022-05-01 20:50:40 +0800
committeralk3pInjection <webmaster@raspii.tech>2022-05-01 20:50:40 +0800
commit5b2cac52ba778c82474b770b8218f12b200abbba (patch)
treeaa6a2935fe22ca8ee764f8d0c5637cc9e540a5f5 /modules/sensors/dynamic_sensor/HidRawSensor.h
parentfff55eaf71d44da7a003bccc4f835351b61efd6e (diff)
parent05445d8b448ea0349822250fa0c2a6f651289736 (diff)
Merge tag 'LA.QSSI.12.0.r1-06800-qssi.0' into sugisawa-mr1HEADsugisawa-mr1
"LA.QSSI.12.0.r1-06800-qssi.0" Change-Id: I3c5a85f5c37b5bba1590d2aa8f67e5b3f01939c8
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;