Heater PID closed-loop on PB12 (HEAT_EN) with safety protections

This commit is contained in:
2026-10-10 10:04:48 +08:00
parent 6246a87c3c
commit 30540d884d
8 changed files with 276 additions and 40 deletions
+4 -1
View File
@@ -13,6 +13,7 @@
#include "rs485.h"
#include "command.h"
#include "ntc.h"
#include "heat.h"
#include "led.h"
#include "pwr_hold.h"
#include <stdio.h>
@@ -38,6 +39,7 @@ int main(void)
rs485_init();
ntc_init();
heat_init();
#if DEBUG_MODE == CFG_ENABLE
printf("FilmForge FW %s, built %s\r\n", PROJECT_VERSION, BUILD_DATE);
@@ -52,8 +54,9 @@ int main(void)
/* RS485 数据口命令处理(D5 帧协议,具体业务命令在 command.c 扩展) */
command_process();
/* NTC 后台采样(100ms 一次)+ M2 连续上报任务 */
/* NTC 后台采样(100ms 一次)+ 加热 PID/PWM 任务 + M2 连续上报任务 */
ntc_sample_task();
heat_task();
command_report_task();
/* debug 串口周期打印 NTC 温度(约 1s 一次,读后台采样全局值) */