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