TMP235 온도 측정 경로 정리

- mst? 온도 응답을 IMU register direct read로 대체
- go_temp/TMP235 legacy 경로 및 빌드 대상 제거
- info_temp 전역 정의를 IMU 모듈로 이동
- TMP235 드라이버는 deprecated reference로 표시
This commit is contained in:
2026-06-15 12:24:06 +09:00
parent 29989054c0
commit 4cd5931e2a
10 changed files with 168 additions and 229 deletions
@@ -27,7 +27,6 @@
#include "app_timer.h"
#include "battery_saadc.h"
#include "main_timer.h"
#include "tmp235_q1.h"
#include "app_raw.h"
#include "dr_piezo.h"
#include "debug_print.h"
@@ -60,9 +59,6 @@ APP_TIMER_DEF(m_battery_loop_timer_id);
/* Low-battery check flag — set by battery_loop, consumed by handler */
bool low_battery_check = false;
/* Safety check mode flag — legacy TMP235 path */
bool safety_check_mode = false;
/* SAADC callback completion flag — used by all_sensors() to wait */
volatile bool battery_saadc_done = false;
@@ -85,7 +81,6 @@ extern uint8_t ble_bin_buffer[BLE_NUS_MAX_DATA_LEN];
volatile uint16_t info_batt;
/* info4 sequential measurement control flags */
extern bool go_temp;
extern bool go_batt;
extern bool motion_raw_data_enabled;
@@ -94,7 +89,7 @@ extern bool motion_data_once;
extern bool maa_async_is_busy(void);
/*==============================================================================
* safety_check_complete - Called by tmp235 handler after temperature measurement
* safety_check_complete - Called after IMU die temperature measurement
*
* Checks both battery voltage and temperature against thresholds.
* 5 consecutive readings exceeding either threshold triggers power OFF.
@@ -168,7 +163,7 @@ void battery_event_handler(nrf_drv_saadc_evt_t const * p_event)
register_val = p_event->data.done.p_buffer[0];
/* Release SAADC — shared with temperature / pressure ADC */
/* Release SAADC — shared with pressure ADC */
nrf_drv_saadc_channel_uninit(0);
nrf_drv_saadc_uninit();
@@ -25,9 +25,6 @@
/* SAADC callback completion flag (used by all_sensors() to wait) */
extern volatile bool battery_saadc_done;
/* Safety check mode flag — legacy TMP235 path */
extern bool safety_check_mode;
/* Called when safety check temperature measurement completes */
void safety_check_complete(float temp_c);
@@ -93,7 +93,7 @@ extern which_cmd_t cmd_type_t; /* Current command source (
uint16_t ssp_data[6]={0,}; /* 6-axis data array for BLE (accel XYZ + gyro XYZ) */
extern bool info4; /* info4 mode flag (set by cmd_parse) */
volatile uint16_t info_imu[6]; /* Global array storing IMU data in info4 mode */
extern volatile uint16_t info_temp; /* Global temperature cache (deg C x 100) */
volatile uint16_t info_temp; /* Global temperature cache (deg C x 100) */
/* --------------------------------------------------------------------------------------
* static function declaration
@@ -1,6 +1,9 @@
/*==============================================================================
* tmp235_q1.c - TMP235-Q1 analogue temperature sensor driver
*
* Deprecated: temperature measurement has been replaced by IMU register direct read paths.
* This file is kept only as a legacy reference and is not built.
*
* Reads the TMP235-Q1 analogue output via SAADC AIN3 and converts to deg C.
*
* Temperature conversion (piecewise linear, per datasheet):