|
|
@ -171,7 +171,7 @@ static void app_event_listener(void* p_event_data, uint16_t event_size) { |
|
|
|
|
|
|
|
// 导联连接事件触发 --> 切换到开机中页面 |
|
|
|
|
|
|
|
else if (BoardEcgSensor_plod_get_connected_state() && znordic_haspassed_ms(lasttrypoweron_time) >= LOW_BATTERY_REMINDER_DELAY_MS) { |
|
|
|
else if (BoardEcgSensor_plod_get_connected_state_after_filter() && znordic_haspassed_ms(lasttrypoweron_time) >= LOW_BATTERY_REMINDER_DELAY_MS) { |
|
|
|
lasttrypoweron_time = znordic_getpower_on_ms(); |
|
|
|
if (BoardBattery_get_battery_level() > APP_WORK_BATTERY_LEVEL) { |
|
|
|
state_machine__change_to_poweroning_state(); |
|
|
@ -183,7 +183,7 @@ static void app_event_listener(void* p_event_data, uint16_t event_size) { |
|
|
|
} |
|
|
|
|
|
|
|
// 10秒后,如果RTC未被设置过,则进入超低功耗 |
|
|
|
else if (ds_cur_state_haspassed_ms() >= 2000) { |
|
|
|
else if (ds_cur_state_haspassed_ms() >= 10000) { |
|
|
|
if (!znordic_rtc_has_setted()) { |
|
|
|
ENTER_DEEP_SLEEP(); |
|
|
|
} |
|
|
@ -434,6 +434,6 @@ void one_conduction_main() { |
|
|
|
ZERROR_CHECK(app_timer_create(&m_state_machine_driver_tmr, APP_TIMER_MODE_REPEATED, state_machine_driver_tmr_cb)); |
|
|
|
ZERROR_CHECK(app_timer_start(m_state_machine_driver_tmr, APP_TIMER_TICKS(300), NULL)); |
|
|
|
|
|
|
|
state_machine__change_to_poweroning_state(); |
|
|
|
state_machine__change_to_standby_state(); |
|
|
|
znordic_loop(); |
|
|
|
} |