- ntc.{h,c}(宿主机可测):分压端 mV → Ω → NCP18XH103F03RB 的 R-T 表插值;
开路 / 短路 / 表外一律「读不到」(t_thermal 因此满速)
- thermal_esp.{h,c}(仅 IDF):ADC1 oneshot + 曲线校准读两路 NTC;两个 PCNT 单元数 TACH 边沿
- app_main:task_thermal 任务体、t_thermal_init 放在上电恢复之前、status 带热管理快照
- test_ntc.c 4 例;全工程 429 例全绿;版本 0.1.0-a16
- 板 B:两路 NTC 38.2 / 34.0 °C;风扇两路 rpm 0 报停转(拉满电流不涨,疑未插风扇,待确认)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
35 行
1017 B
CMake
35 行
1017 B
CMake
# ESP-IDF 侧的 main 组件。
|
|
# app_main.c / ulink_esp.c / mlink_esp.c / thermal_esp.c 是 ESP 专用;其余 .c 必须同时在宿主机上编得过
|
|
# (新增文件时两处都要加:这里 + host/CMakeLists.txt 的 PHONERAIL_CORE_SRCS)。
|
|
idf_component_register(
|
|
SRCS "app_main.c"
|
|
"ulink_esp.c"
|
|
"mlink_esp.c"
|
|
"version.c"
|
|
"rail.c"
|
|
"rail_cfg.c"
|
|
"i2cbus.c"
|
|
"slot.c"
|
|
"sched.c"
|
|
"tasks.c"
|
|
"t_safety.c"
|
|
"t_actuator.c"
|
|
"t_thermal.c"
|
|
"evlog.c"
|
|
"cmd_json.c"
|
|
"cmd.c"
|
|
"cmd_exec.c"
|
|
"cmd_report.c"
|
|
"ulink.c"
|
|
"cmd_net.c"
|
|
"netcfg.c"
|
|
"mlink.c"
|
|
"bringup.c"
|
|
"ntc.c"
|
|
"thermal_esp.c"
|
|
INCLUDE_DIRS "."
|
|
EMBED_TXTFILES "certs/evse_ca.pem"
|
|
REQUIRES phonerail_hal drv esp_driver_usb_serial_jtag
|
|
esp_wifi esp_netif esp_event esp_timer nvs_flash mqtt
|
|
esp_adc esp_driver_pcnt)
|