projects
/
mirrors
/
FD230.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb7d5d2
)
心率:修复了心率血氧结构体的数据读取
1629/1
1629/head
author
Caisking
<3449750381@qq.com>
Tue, 14 Jan 2025 09:05:38 +0000
(17:05 +0800)
committer
Caisking
<3449750381@qq.com>
Tue, 14 Jan 2025 09:05:38 +0000
(17:05 +0800)
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
patch
|
blob
|
history
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
patch
|
blob
|
history
diff --git
a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
index
bf84199
..
1e92490
100644
(file)
--- a/
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
+++ b/
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.cpp
@@
-651,7
+651,7
@@
std::string HealthService::get_heart_data() {
// 将数据格式化为字符串,拼接到结果中
result << formatTime(data.timestamp) << "," << std::to_string(data.Heart)
<< "\n";
- WEARABLE_LOG
D
(WEARABLE_LOG_MODULE_APP, "get_heart_data %d %d",
+ WEARABLE_LOG
E
(WEARABLE_LOG_MODULE_APP, "get_heart_data %d %d",
data.timestamp, data.Heart);
}
diff --git
a/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
b/code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
index
6c4fe38
..
9028f39
100644
(file)
--- a/
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
+++ b/
code/sdk/application/wearable/fd230app/nativeui/heart_blood/health_service/health_service.h
@@
-31,13
+31,13
@@
namespace OHOS
#pragma pack(push, 1) // 设置对齐为1字节
typedef struct
{
- uint8_t SPO2; // 血氧值
uint32_t timestamp; // 最近一次检测时间
+ uint8_t SPO2; // 血氧值
} BloodOxygenData;
typedef struct
{
- uint8_t Heart; // 心率值
uint32_t timestamp; // 最近一次检测时间
+ uint8_t Heart; // 心率值
} HeartRateData;
#pragma pack(pop) // 恢复默认对齐
// 检查类