From 93a11b751908b75cd204e6d822e4a49644d2cc2d Mon Sep 17 00:00:00 2001 From: jhchun Date: Mon, 20 Apr 2026 12:12:51 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=9B=90=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EB=B6=80=ED=8C=85=20=ED=8C=90=EC=A0=95=20=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=EC=9D=84=20=EC=8B=A4=EC=B8=A1=20=EA=B8=B0=EC=A4=80=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=B4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 버튼 카운터가 초기화 후부터 증가하기 때문에 체감 2초 부팅에 맞게 부팅 판정 tick을 400(2s) -> 250(1.25s)로 변경 --- project/ble_peripheral/ble_app_bladder_patch/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/project/ble_peripheral/ble_app_bladder_patch/main.c b/project/ble_peripheral/ble_app_bladder_patch/main.c index d7eb395..a5817a6 100644 --- a/project/ble_peripheral/ble_app_bladder_patch/main.c +++ b/project/ble_peripheral/ble_app_bladder_patch/main.c @@ -233,7 +233,6 @@ static volatile bool s_tx_pending = false; /* TX re static uint8_t s_tx_pending_buf[BLE_NUS_MAX_DATA_LEN] = {0}; /* Pending packet (with CRC) */ static uint16_t s_tx_pending_len = 0; /* Pending packet length */ - char m_static_passkey[PASSKEY_LENGTH] = DEFAULT_PASSKEY; /* Static passkey (6 digits, loaded from FDS) */ char SERIAL_NO[SERIAL_NO_LENGTH] = {0}; /* Serial number (used as BLE device name) */ char HW_NO[HW_NO_LENGTH] = {0}; /* Hardware number (FDS stored/read) */ @@ -1607,13 +1606,13 @@ static void main_s(void * p_context) /* ---- Boot phase ---- */ if (button_released) { - if ((cnt_s < 400) && (m_reset_status != 2)) + if ((cnt_s < 250) && (m_reset_status != 2)) { led_set_state(LED_STATE_OFF); power_control_handler(OFF); cnt_s = 0; } - else if (cnt_s > 3000) /* 3000 x 5ms = 15s */ + else if (cnt_s >= 3000) /* 3000 x 5ms = 15s */ { DBG_PRINTF("[BTN] Bond Delete\r\n"); power_control_handler(ON); @@ -1625,7 +1624,7 @@ static void main_s(void * p_context) go_device_power_off = true; main_timer_start(); } - else if (cnt_s > 400 || (m_reset_status == 2)) /* 400 x 5ms = 2s */ + else if (cnt_s > 250 || (m_reset_status == 2)) /* 250 x 5ms = 1.25s + α */ { DBG_PRINTF("[BTN] Boot (cnt=%d)\r\n", cnt_s); device_reset = false; @@ -1654,7 +1653,7 @@ static void main_s(void * p_context) cnt_s++; device_reset = false; - if (cnt_s == 400) /* 400 x 5ms = 2s */ + if (cnt_s == 250) /* 250 x 5ms = 1.25s + α */ { led_set_state(LED_STATE_POWER_ON); DBG_PRINTF("[BTN] 2.0s\r\n");