diff --git a/app/app.uvoptx b/app/app.uvoptx
index b58c57b..8aebd78 100644
--- a/app/app.uvoptx
+++ b/app/app.uvoptx
@@ -120,7 +120,8 @@
0
DLGUARM
-
+ d
+
0
ARMRTXEVENTFLAGS
@@ -153,16 +154,16 @@
0
19
1
- 0
+ 189332
0
0
0
0
0
- 0
+ 1
.\src\main.c
-
+ \\app\src/main.c\19
diff --git a/app/src/board/board.h b/app/src/board/board.h
index 62c34f0..307df0f 100644
--- a/app/src/board/board.h
+++ b/app/src/board/board.h
@@ -57,7 +57,7 @@
* 应用程序配置 *
*******************************************************************************/
-#define HEART_WAVE_SAMPLE_SERVICE_CACHE_SIZE (3 * 3 * 256)
+#define HEART_WAVE_SAMPLE_SERVICE_CACHE_SIZE (3 * 3 * 128)
#define FILE_MAX_COUNT 1
#define SDCARD_MAX_FILE_SIZE (uint32_t)(3.5 * 1024 * 1024 * 1024)
//
diff --git a/app/src/board/board_beep_ctrl.c b/app/src/board/board_beep_ctrl.c
index 43cb2c2..2ed6b13 100644
--- a/app/src/board/board_beep_ctrl.c
+++ b/app/src/board/board_beep_ctrl.c
@@ -1,5 +1,5 @@
#include "board_beep_ctrl.h"
-#define BEEP_TIMER_INTERVAL (200)
+#define BEEP_TIMER_INTERVAL (150)
#if 1
APP_TIMER_DEF(m_beep_tmr); //
@@ -22,7 +22,7 @@ static nrf_drv_pwm_config_t const m_beep_pwm0_config0 = {
.irq_priority = APP_IRQ_PRIORITY_LOWEST,
.base_clock = NRF_PWM_CLK_125kHz,
.count_mode = NRF_PWM_MODE_UP,
- .top_value = 56, // 125kHz / 46 = 2.717k
+ .top_value = 80, // 125kHz / 46 = 2.717k
.load_mode = NRF_PWM_LOAD_INDIVIDUAL,
.step_mode = NRF_PWM_STEP_AUTO,
};
diff --git a/app/src/device_ctrl_service.c b/app/src/device_ctrl_service.c
index 42e6f98..f1ef22f 100644
--- a/app/src/device_ctrl_service.c
+++ b/app/src/device_ctrl_service.c
@@ -208,6 +208,7 @@ static void app_event_listener(void* p_event_data, uint16_t event_size) { //
// 采集的字节长度超过最大字节长度,停止采集
if (event->eventType == kevent_capture_data_block_event) {
+ ZLOGI("capture data block %d", event->val.block_sensor_data.len);
SampleDataMgr_write(m_sample_data_fd, (uint8_t*)event->val.block_sensor_data.data, event->val.block_sensor_data.len);
}
@@ -296,13 +297,8 @@ void DeviceCtrl_init() {
SampleDataMgr_init();
// 心电采集服务初始化
hwss_init();
- // 注册事件监听
- AppEvent_regListener(app_event_listener);
- // 监听蓝牙事件
- zble_module_reglistener(zble_event_listener);
// BoardLight_blockFlash(3, 100);
-
BoardBattery_load();
if (BoardBattery_get_battery_level() < APP_LOW_BATTERY_POWER_ON_LIMIT) {
BoardLight_blockFlash(3, 100);
@@ -315,6 +311,11 @@ void DeviceCtrl_init() {
m_ispoweron = false;
}
+ // 注册事件监听
+ AppEvent_regListener(app_event_listener);
+ // 监听蓝牙事件
+ zble_module_reglistener(zble_event_listener);
+
// 切换到待机状态
prvf_change_to_ready_state();
diff --git a/app/src/heart_wave_sample_service.c b/app/src/heart_wave_sample_service.c
index 80be732..1961a0e 100644
--- a/app/src/heart_wave_sample_service.c
+++ b/app/src/heart_wave_sample_service.c
@@ -443,18 +443,18 @@ static void ads1293_sample_one_frame() {
// medianFilter
- static uint32_t val[3];
- val[0] = MedianFilter_Update(&medianFilter[0], sample[SENSOR0_ID]);
- val[1] = MedianFilter_Update(&medianFilter[1], sample[SENSOR1_ID]);
- val[2] = MedianFilter_Update(&medianFilter[2], sample[SENSOR2_ID]);
+ uint32_t val[3];
+ // val[0] = MedianFilter_Update(&medianFilter[0], sample[SENSOR0_ID]);
+ // val[1] = MedianFilter_Update(&medianFilter[1], sample[SENSOR1_ID]);
+ // val[2] = MedianFilter_Update(&medianFilter[2], sample[SENSOR2_ID]);
// int32_t val0 = LPFilter_Update(&lowpassfilter[0], sample[SENSOR0_ID]);
// int32_t val1 = LPFilter_Update(&lowpassfilter[1], sample[SENSOR1_ID]);
// int32_t val2 = LPFilter_Update(&lowpassfilter[2], sample[SENSOR2_ID]);
- // uint32_t val0 = sample[SENSOR0_ID];
- // uint32_t val1 = sample[SENSOR1_ID];
- // uint32_t val2 = sample[SENSOR2_ID];
+ val[0] = sample[SENSOR0_ID];
+ val[1] = sample[SENSOR1_ID];
+ val[2] = sample[SENSOR2_ID];
if (val[0] > 0xffffff) val[0] = 0xffffff;
if (val[1] > 0xffffff) val[1] = 0xffffff;
@@ -488,7 +488,7 @@ static void ads1293_sample_one_frame() {
/**
* @brief 缓存数据,并触发小数据块事件
*/
- pLittleBlockCache_push_one_frame(val);
+ pLittleBlockCache_push_one_frame(&val[0]);
if (pLittleBlockCache_is_full()) {
pEventHelper_trigger_little_block_data_event();
pLittleBlockCache_reset();
diff --git a/dynamic_electrocardiograph_ble_server b/dynamic_electrocardiograph_ble_server
index 0f6adf0..03eb63b 160000
--- a/dynamic_electrocardiograph_ble_server
+++ b/dynamic_electrocardiograph_ble_server
@@ -1 +1 @@
-Subproject commit 0f6adf0cac84c8f4f23eb7aca53fcc751bcb113b
+Subproject commit 03eb63bb18a16f04fb2aedab5a9c955d66ac7b96
diff --git a/libznordic b/libznordic
index 1263772..f6a9d8d 160000
--- a/libznordic
+++ b/libznordic
@@ -1 +1 @@
-Subproject commit 1263772874368d62efa76fe69a2af9e34ee3f608
+Subproject commit f6a9d8d2a92bb3a1ce00df2a316bd602bf579b20