Browse Source

update

master
zhaohe 1 year ago
parent
commit
d2db03e28d
  1. 9
      app/app.uvoptx
  2. 2
      app/src/board/board.h
  3. 4
      app/src/board/board_beep_ctrl.c
  4. 11
      app/src/device_ctrl_service.c
  5. 16
      app/src/heart_wave_sample_service.c
  6. 2
      dynamic_electrocardiograph_ble_server
  7. 2
      libznordic

9
app/app.uvoptx

@ -120,7 +120,8 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name> </Name> </SetRegEntry>
<Name>d</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMRTXEVENTFLAGS</Key>
@ -153,16 +154,16 @@
<Type>0</Type>
<LineNumber>19</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<Address>189332</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<BreakIfRCount>1</BreakIfRCount>
<Filename>.\src\main.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
<Expression>\\app\src/main.c\19</Expression>
</Bp>
</Breakpoint>
<Tracepoint>

2
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)
//

4
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,
};

11
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();

16
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();

2
dynamic_electrocardiograph_ble_server

@ -1 +1 @@
Subproject commit 0f6adf0cac84c8f4f23eb7aca53fcc751bcb113b
Subproject commit 03eb63bb18a16f04fb2aedab5a9c955d66ac7b96

2
libznordic

@ -1 +1 @@
Subproject commit 1263772874368d62efa76fe69a2af9e34ee3f608
Subproject commit f6a9d8d2a92bb3a1ce00df2a316bd602bf579b20
Loading…
Cancel
Save