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

@@ -29,6 +29,7 @@
#include "nrf_delay.h"
#include "dr_piezo.h"
#include "dr_util.h"
#include "main.h"
#include "dr_adc121s051.h"
@@ -51,7 +52,7 @@ extern void param_error(const char *cmd); /* 파라미터 오류 시 BLE로
/* BLE 바이너리 전송 함수 */
extern void single_format_data(uint8_t *buffer, const char *tag, uint16_t value); /* TAG(4바이트) + uint16 값(2바이트)을 buffer에 포맷팅 */
extern void ascii_format_data(uint8_t *buffer, const char *tag, const char *ascii, uint8_t len); /* TAG(4바이트) + ASCII 문자열을 buffer에 포맷팅 */
extern void ascii_format_data(uint8_t *buffer, const char *tag, const char *ascii, size_t len); /* TAG(4바이트) + ASCII 문자열을 buffer에 포맷팅 */
extern void dr_binary_tx_safe(const uint8_t *buffer, uint16_t length); /* BLE NUS를 통해 바이너리 데이터 전송 (length는 워드 단위) */
extern volatile bool data_tx_in_progress; /* BLE TX 진행 중 플래그 */
extern void dr_sd_delay_ms(uint32_t ms); /* SoftDevice 호환 딜레이 (BLE 스택 이벤트 처리 허용) */
@@ -663,7 +664,7 @@ static int Cmd_mss(const ParsedCmd *cmd)
static int Cmd_mfv(const ParsedCmd *cmd)
{
(void)cmd;
ascii_format_data(ble_bin_buffer, "rfv:", DR_DEVICE_VERSION, 12);
ascii_format_data(ble_bin_buffer, "rfv:", FIRMWARE_VERSION, 12);
dr_binary_tx_safe(ble_bin_buffer, 8); /* 4(TAG) + 12(버전) = 16바이트 = 8워드 */
return 1;
}