From 7da5f8dc0203e8ebb3ab3be26bbca84bb1c3bd6a Mon Sep 17 00:00:00 2001 From: lixiangpeng5 Date: Fri, 12 Aug 2022 17:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixiangpeng5 Change-Id: I8abde2350329a77f195ee617bb362c82feb00e1d --- services/sensor/src/sensor_data_processer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/sensor/src/sensor_data_processer.cpp b/services/sensor/src/sensor_data_processer.cpp index 4c7e18b5..9399cd22 100644 --- a/services/sensor/src/sensor_data_processer.cpp +++ b/services/sensor/src/sensor_data_processer.cpp @@ -192,11 +192,11 @@ bool SensorDataProcesser::ReportNotContinuousData(std::unordered_map sensorLock(sensorMutex_); auto sensor = sensorMap_.find(sensorId); - sensor->second.SetFlags(event.mode); if (sensor == sensorMap_.end()) { SEN_HILOGE("data's sensorId is not supported"); return false; } + sensor->second.SetFlags(event.mode); if (((SENSOR_ON_CHANGE & sensor->second.GetFlags()) == SENSOR_ON_CHANGE) || ((SENSOR_ONE_SHOT & sensor->second.GetFlags()) == SENSOR_ONE_SHOT)) { std::vector sendEvents; -- Gitee