DEFAULT_PASSKEY 매크로 통합 + advertising_start 조건 변경

- 본딩 삭제가 실행되지 않는 버그 개선
This commit is contained in:
jhChun
2026-03-27 16:17:09 +09:00
parent 153c4a027f
commit 3455bc2b38
3 changed files with 7 additions and 6 deletions

View File

@@ -37,7 +37,7 @@
#include <stdint.h>
/* -------------------------------------------------------------------------
* 기본 버전 정보 (FDS 기값 및 빈 필드 복구 시 사용)
* 기본 버전 정보 (FDS 기값 및 빈 필드 복구 시 사용)
*
* 하드웨어 식별 코드
* - VBTHW0100 = 개발(시험)용 Ver 1.00

View File

@@ -358,7 +358,7 @@ static void load_default_config(void)
memcpy(SERIAL_NO, SERIAL_NUMBER, strlen(SERIAL_NUMBER));
memset(m_static_passkey, 0, PASSKEY_LENGTH);
memcpy(m_static_passkey, "123456", PASSKEY_LENGTH);
memcpy(m_static_passkey, DEFAULT_PASSKEY, PASSKEY_LENGTH);
m_reset_status = 1;
bond_data_delete = 1;
@@ -1597,7 +1597,7 @@ static void main_s(void * p_context)
nrf_delay_ms(100);
bond_data_delete = true;
m_config.bond_data_delete = (uint8_t)bond_data_delete;
const char pass_init[PASSKEY_LENGTH] = "123456";
const char pass_init[PASSKEY_LENGTH] = DEFAULT_PASSKEY;
memcpy(m_config.static_passkey, pass_init, PASSKEY_LENGTH);
config_save();
nrf_delay_ms(1000);
@@ -1613,7 +1613,7 @@ static void main_s(void * p_context)
battery_timer_start();
#if FEATURE_SECURE_CONNECTION
advertising_start(erase_bonds);
advertising_start(erase_bonds || bond_data_delete);
#else
advertising_start();
#endif