From 88b5725643a04da8644938a81365608db03171cf Mon Sep 17 00:00:00 2001 From: jamming Date: Wed, 31 Jul 2024 16:09:43 +0800 Subject: [PATCH] Set Temperature Senor prams --- .../AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/defaults.parm | 3 +++ .../AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/hwdef.dat | 12 ++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/defaults.parm index a8eeca84153be..2b7d4f82a1b28 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/defaults.parm +++ b/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/defaults.parm @@ -1,3 +1,6 @@ # Enable TYTS03 +TEMP1_TYPE 4 +TEMP1_SRC 3 +TEMP1_SRC_ID 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/hwdef.dat index 1afd4fa1ee8ef..93c70ee51ea6a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/HolybroF4_PMU/hwdef.dat @@ -110,16 +110,8 @@ define AP_BATT_CURR_AMP_OFFSET_DEFAULT 0.409 # ------------------ Temperature Sensor ----------------------- define AP_TEMPERATURE_SENSOR_ENABLED 1 define AP_TEMPERATURE_SENSOR_TSYS03_ENABLED 1 -#define AP_TEMPERATURE_SENSOR_I2C_ADDR_DEFAULT 64 -#define AP_TEMPERATURE_SENSOR_I2C_BUS_DEFAULT 0 -#define AP_TEMPERATURE_SENSOR_TEMP1_TYPE 4 -define HAL_TEMP1_TYPE 4 -define HAL_TEMP1_ADDR 64 -define HAL_TEMP1_BUS 0 -define HAL_TEMP1_SRC 3 -define HAL_TEMP1_SRC_ID 1 - - +define AP_TEMPERATURE_SENSOR_I2C_ADDR_DEFAULT 64 +define AP_TEMPERATURE_SENSOR_I2C_BUS_DEFAULT 0