/** ****************************************************************************** * @file App_pidControl.h * @brief PID 控温任务接口 (App 应用层) * * @note 预加热达标后由 Task_Preheat 移交本任务: 每 500ms 对 24 路 PTC * 做闭环 PID 控温, 风扇按分区温度分档; 过程值取自 Mid_temp 的 * BMC 24 路温度 (快照 offset 21..68), 目标温度用 EEPROM 参数。 ****************************************************************************** */ #ifndef __APP_PIDCONTROL_H #define __APP_PIDCONTROL_H #include #include "FreeRTOS.h" #include "task.h" extern TaskHandle_t xPidControlTaskHandle; /** * @brief 创建 PID 控温任务 * @note 在 vTaskStartScheduler() 之前调用一次; 句柄存于 xPidControlTaskHandle。 * @param 无 * @return 无 */ void App_pidControl_task_create(void); /** * @brief 启动 PID 闭环控温 (预加热达标移交入口) * @note 24 路统一设置目标温度并清零积分/历史误差后开始闭环 * @param target : 目标温度 (°C, EEPROM 参数) * @return 无 */ void App_pidControl_Start(uint8_t target); /** * @brief 停止 PID 闭环并清空全部输出 (立即下发 SET_ALL 停热) * @param 无 * @return 无 */ void App_pidControl_Stop(void); /** * @brief 查询 PID 闭环控温是否运行中 * @note 供 UI/其它任务只读状态用 * @param 无 * @return 1=正在 PID 控温, 0=未运行 */ uint8_t App_pidControl_is_running(void); #endif /* __APP_PIDCONTROL_H */