전원 버튼 BSP 제거, GPIO 제어로 전환
- 전원 OFF 로직 추가(main_s) - processing 변수 삭제
This commit is contained in:
@@ -62,7 +62,6 @@ extern bool info4;
|
||||
|
||||
extern char ble_tx_buffer[BLE_NUS_MAX_DATA_LEN];
|
||||
extern bool go_device_power_off;
|
||||
extern volatile bool processing;
|
||||
extern which_cmd_t cmd_type_t;
|
||||
extern uint8_t ble_bin_buffer[BLE_NUS_MAX_DATA_LEN];
|
||||
|
||||
@@ -137,7 +136,7 @@ void battery_event_handler( nrf_drv_saadc_evt_t const * p_event )
|
||||
info_batt = batt_lvl_in_milli_volt_1;
|
||||
}
|
||||
|
||||
/* --- Normal mode: send rsn: BLE / UART response --- */
|
||||
/* --- Normal mode: send rsn: BLE response --- */
|
||||
else
|
||||
{
|
||||
if (cmd_type_t == CMD_UART)
|
||||
@@ -206,16 +205,13 @@ void battery_loop(void * p_context)
|
||||
{
|
||||
UNUSED_PARAMETER(p_context);
|
||||
|
||||
if (processing == true || info4 == true)
|
||||
if (info4 == true)
|
||||
{
|
||||
processing = false ;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
low_battery_check = true;
|
||||
battery_level_meas();
|
||||
}
|
||||
|
||||
low_battery_check = true;
|
||||
battery_level_meas();
|
||||
}
|
||||
|
||||
/* Start the periodic battery monitoring timer. */
|
||||
|
||||
Reference in New Issue
Block a user