血氧:增加读写控制 1243/2
authorCaisking <3449750381@qq.com>
Wed, 23 Oct 2024 03:59:11 +0000 (11:59 +0800)
committerCaisking <3449750381@qq.com>
Wed, 23 Oct 2024 03:59:11 +0000 (11:59 +0800)
code/sdk/application/wearable/fd230app/nativeui/bloodoxygen/src/BloodOxygenModel.cpp

index 3689e36..1f3c2d4 100644 (file)
@@ -5,6 +5,7 @@
 #include "wearable_log.h"
 #include "heart_blood/health_service/health_service.h"
 #include "custom_utils.h"
+
 extern "C" errcode_t uapi_get_timestamp_ms(uint32_t *tm);
 
 #include "custom_utils.h"
@@ -141,13 +142,13 @@ namespace OHOS
     // 保存检测数据
     void BloodOxygenModel::Blood_Save()
     {
-        BloodOxygenData data;
-        data.SPO2 = currentspo2;
-        data.timestamp = BloodResultPresenter::GetInstance()->GetCurrentTime();
-        SetCheckTime(data.timestamp);
-        HealthService::GetInstance()->UpdateHealthData(data);
 
-        WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d %ld", currentspo2, data.timestamp);
+         uint32_t timestamp = BloodResultPresenter::GetInstance()->GetCurrentTime();
+         SetCheckTime(timestamp);
+         
+        //HealthService::GetInstance()->UpdateHealthData(data);
+         HealthService::GetInstance()->send_blood_save();
+             
     }
 
     // 显示检测结果// 显示检测结果