fix: BLE TX 먹통 해결 및 메모리 안전성 개선

- binary_tx_handler를 dr_binary_tx_safe로 전체 교체 (APP_ERROR_CHECK 제거)
- data_tx_handler APP_ERROR_CHECK → DBG_PRINTF 교체
- memset/memcpy 하드코딩 크기를 define 상수로 교체 (버퍼 오버런 수정)
- SERIAL_NO_LENGTH, HW_NO_LENGTH, PASSKEY_LENGTH를 main.h로 통합
- 미사용 HW 드라이버/EEPROM 코드 삭제, TWI를 i2c_manager.c로 통합
- EEPROM → FDS 전환, 코드 리뷰 현황 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-16 16:39:26 +09:00
parent 836ebe5878
commit a1ad2a4b5b
76 changed files with 43253 additions and 16370 deletions

View File

@@ -19,7 +19,6 @@
#include "ble_nus.h"
#include "tmp235_q1.h"
#include "main.h"
#include "meas_pd_48.h"
#include <cmd_parse.h>
#include "main_timer.h"
#include "debug_print.h"
@@ -42,7 +41,7 @@ extern uint8_t ble_bin_buffer[BLE_NUS_MAX_DATA_LEN] ;
extern which_cmd_t cmd_type_t;
extern bool info4; //cmd_parse
extern bool go_temp; //cmd_parse
extern volatile uint16_t info_temp; //48_C
volatile uint16_t info_temp; //48_C
extern bool motion_raw_data_enabled;
/**@brief Function for handling the ADC interrupt.
@@ -87,7 +86,7 @@ void tmp235_voltage_handler(nrf_drv_saadc_evt_t const * p_event) /* TMP325 Vout
led_temp_16 = (uint16_t)(led_temp*100);
single_format_data(ble_bin_buffer, "rso:", led_temp_16);
binary_tx_handler(ble_bin_buffer,3);
dr_binary_tx_safe(ble_bin_buffer,3);
// sprintf(ble_tx_buffer, "To%.2f\r\n",led_temp);
// data_tx_handler(ble_tx_buffer);