feat: Modbus 新增 0x0012 系统指令寄存器,写 0x2C2C 复位 MCU (对齐 700BS 0x2C)

This commit is contained in:
wangfq
2026-07-31 08:21:39 +08:00
parent 2ae7ac91e3
commit 22511ba466
3 changed files with 18 additions and 19 deletions
+1 -19
View File
@@ -125,25 +125,7 @@ static void handle_query_freq(uint8_t addr)
/* 0x2C — 复位初始化线圈 */
static void handle_reset_init(uint8_t addr)
{
(void)addr;
extern uint8_t g_loop_stable;
extern uint8_t loop1_LOOP_OK0;
extern uint8_t loop1_LC_Reset;
extern uint8_t loop1_INI_LOOP;
extern uint16_t loop1_stable_cnt;
extern uint16_t LC_Hold_CNT;
extern uint32_t loop1_ORG_CNT, loop1_ORG_SUM;
loop1_LC_Reset = 1;
loop1_INI_LOOP = 1;
loop1_LOOP_OK0 = 0;
g_loop_stable = 0;
loop1_stable_cnt = 0;
LC_Hold_CNT = 0;
loop1_ORG_CNT = 0;
loop1_ORG_SUM = 0;
_hb_need_init = 1;
_last_car_state = (_last_car_state ^ 1);
SYS_ResetExecute();
PRINT("RS485: coil reset init\n");
}