전원 버튼 부팅 판정 시간을 실측 기준으로 보정

- 버튼 카운터가 초기화 후부터 증가하기 때문에 체감 2초 부팅에 맞게 부팅 판정 tick을 400(2s) -> 250(1.25s)로 변경
This commit is contained in:
2026-04-20 12:12:51 +09:00
parent 2db6e36c08
commit 93a11b7519

View File

@@ -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");