mirror of
https://gitee.com/openharmony/sensors_sensor
synced 2024-12-04 04:31:52 +00:00
!641 Add acc&ambient_light1 for log print
Merge pull request !641 from 17349030869/master
This commit is contained in:
commit
55e39a14e0
@ -50,8 +50,11 @@ private:
|
||||
std::mutex clientLoginfoMutex_;
|
||||
LogPrintInfo info_;
|
||||
std::map<int32_t, LogPrintInfo> hdiLoginfo_ = {
|
||||
{SENSOR_TYPE_ID_ACCELEROMETER, info_},
|
||||
{SENSOR_TYPE_ID_GYROSCOPE, info_},
|
||||
{SENSOR_TYPE_ID_POSTURE, info_},
|
||||
{SENSOR_TYPE_ID_AMBIENT_LIGHT, info_},
|
||||
{SENSOR_TYPE_ID_AMBIENT_LIGHT1, info_},
|
||||
{SENSOR_TYPE_ID_MAGNETIC_FIELD, info_},
|
||||
};
|
||||
std::map<const SensorUser *, LogPrintInfo> clientLoginfo_;
|
||||
|
@ -41,10 +41,14 @@ const std::vector<int32_t> g_triggerSensorType = {
|
||||
SENSOR_TYPE_ID_HALL_EXT,
|
||||
SENSOR_TYPE_ID_PROXIMITY,
|
||||
SENSOR_TYPE_ID_HALL,
|
||||
SENSOR_TYPE_ID_WEAR_DETECTION,
|
||||
};
|
||||
const std::vector<int32_t> g_continuousSensorType = {
|
||||
SENSOR_TYPE_ID_ACCELEROMETER,
|
||||
SENSOR_TYPE_ID_POSTURE,
|
||||
SENSOR_TYPE_ID_AMBIENT_LIGHT,
|
||||
SENSOR_TYPE_ID_AMBIENT_LIGHT1,
|
||||
SENSOR_TYPE_ID_GYROSCOPE,
|
||||
SENSOR_TYPE_ID_MAGNETIC_FIELD,
|
||||
};
|
||||
}
|
||||
@ -98,12 +102,16 @@ int32_t PrintSensorData::GetDataDimension(int32_t sensorId)
|
||||
switch (sensorId) {
|
||||
case SENSOR_TYPE_ID_HALL:
|
||||
case SENSOR_TYPE_ID_PROXIMITY:
|
||||
case SENSOR_TYPE_ID_WEAR_DETECTION:
|
||||
return ONE_DIMENSION;
|
||||
case SENSOR_TYPE_ID_HALL_EXT:
|
||||
return TWO_DIMENSION;
|
||||
case SENSOR_TYPE_ID_POSTURE:
|
||||
return SEVEN_DIMENSION;
|
||||
case SENSOR_TYPE_ID_AMBIENT_LIGHT:
|
||||
case SENSOR_TYPE_ID_AMBIENT_LIGHT1:
|
||||
case SENSOR_TYPE_ID_ACCELEROMETER:
|
||||
case SENSOR_TYPE_ID_GYROSCOPE:
|
||||
case SENSOR_TYPE_ID_MAGNETIC_FIELD:
|
||||
return THREE_DIMENSION;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user