zhaohe 1 year ago
parent
commit
f0b2c1640c
  1. 13
      app/src/one_conduction_main.c

13
app/src/one_conduction_main.c

@ -138,7 +138,7 @@ void ENTER_DEEP_SLEEP() {
BoardBattery_sence_gpio_init_before_sleep();
// nrf_sdh_disable_request();
app_timer_stop_all();
// nrf_sdh_disable_request();
nrf_sdh_suspend();
sd_power_system_off();
NVIC_SystemReset();
}
@ -159,7 +159,6 @@ static void app_event_listener(void* p_event_data, uint16_t event_size) {
* *
*******************************************************************************/
if (ds_now_state() == kdevice_state_standby) {
ZLOGI("standby......");
// -->
if (BoardBattery_get_charging_state()) {
state_machine__change_to_charging_state();
@ -171,11 +170,11 @@ static void app_event_listener(void* p_event_data, uint16_t event_size) {
}
// 10RTC未被设置过
else if (ds_cur_state_haspassed_ms() >= 2000) {
if (!znordic_rtc_has_setted()) {
ENTER_DEEP_SLEEP();
}
}
// else if (ds_cur_state_haspassed_ms() >= 2000) {
// if (!znordic_rtc_has_setted()) {
// ENTER_DEEP_SLEEP();
// }
// }
}
/*******************************************************************************

Loading…
Cancel
Save