From 212d9ede6f8da4bc20c36694e4cbb9d08711f597 Mon Sep 17 00:00:00 2001 From: wrh Date: Thu, 17 Sep 2026 13:59:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=8D=87=E7=BA=A7=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=87=B3V1.1.32=E5=B9=B6=E8=B0=83=E6=95=B4=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 更新全局版本号和版本字符串至V1.1.32 2. 将协议板版本寄存器0x0300的版本编码移至chrg_comm.c管理,当前返回0x0130 3. 修复sink角色切换时的初始化阶段设置错误 4. 更新应用启动日志版本号 --- apps/chrg/applications/thread/chrg_comm.c | 9 +++------ apps/chrg/applications/utils/chrg_def.h | 9 +++------ apps/chrg/applications/utils/chrg_sink.c | 2 +- docs/修改日志.md | 7 +++++++ 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/apps/chrg/applications/thread/chrg_comm.c b/apps/chrg/applications/thread/chrg_comm.c index f8412ae..ae27f44 100644 --- a/apps/chrg/applications/thread/chrg_comm.c +++ b/apps/chrg/applications/thread/chrg_comm.c @@ -1,7 +1,7 @@ /**************************************************************************** 文件名称 : chrg_comm.c 完成日期 : -当前版本号 : V1.1.31 +当前版本号 : V1.1.32 主要功能 : 实现对外通讯协议 MODBUS 服务端,以独立线程等待处理响应请求数据。 版本历史 : 创建原始版本 说明 : @@ -27,6 +27,8 @@ #include "stm32f4xx_hal.h" #define HOLD_REG_FIRMWARE_VERSION 0x0300U /* 协议板固件版本,只读 */ +#define CHRG_FIRMWARE_VERSION 0x0130U /* 当前协议板版本:V1.1.32 */ + rt_uint8_t ucDiscInBuf[(TOTAL_DISC_REGS+BITS_UCHAR-1)/BITS_UCHAR]; rt_uint8_t ucCoilBuf[(TOTAL_COIL_REGS+BITS_UCHAR-1)/BITS_UCHAR]; @@ -2646,11 +2648,6 @@ static eMBException chrg_comm_apply_sink_effect(rt_uint8_t ch, rt_uint16_t old_loadc = pReal->sink.loadc; rt_uint8_t old_on_work = pReal->sink.On_work; rt_uint8_t old_work_mode = pReal->sink.work_mode; - rt_uint8_t old_sub = pReal->sub; - rt_uint8_t old_test_mode_old = pReal->sink.test.test_mode_old; - rt_uint8_t old_test_run_flag = pReal->sink.test.run_flag; - rt_uint8_t old_test_work_step = pReal->sink.test.work_step; - rt_uint8_t old_test_stop_step = pReal->sink.test.stop_step; rt_bool_t old_test_or_load_active; rt_uint16_t sink_work = pShadow->sink.Now_State; chrg_param_diff_t diff_info; diff --git a/apps/chrg/applications/utils/chrg_def.h b/apps/chrg/applications/utils/chrg_def.h index 8dad0de..3e95822 100644 --- a/apps/chrg/applications/utils/chrg_def.h +++ b/apps/chrg/applications/utils/chrg_def.h @@ -1,7 +1,7 @@ /**************************************************************************** 文件名称 : chrg_def.h 完成日期 : -当前版本号 : V1.1.26 +当前版本号 : V1.1.32 主要功能 : 全局宏定义,常量,及结构体。 版本历史 : 创建原始版本 说明 : @@ -15,11 +15,8 @@ /* CHRG application version. Keep this value synchronized with the changelog. */ #define CHRG_VERSION_MAJOR 1U #define CHRG_VERSION_MINOR 1U -#define CHRG_VERSION_PATCH 26U -#define CHRG_VERSION_STRING "V1.1.26" -/* Modbus version encoding: major<<8 + minor<<4 + patch. */ -#define CHRG_FIRMWARE_VERSION ((CHRG_VERSION_MAJOR << 8) + \ - (CHRG_VERSION_MINOR << 4) + CHRG_VERSION_PATCH) +#define CHRG_VERSION_PATCH 32U +#define CHRG_VERSION_STRING "V1.1.32" /* * Channel polling mode: diff --git a/apps/chrg/applications/utils/chrg_sink.c b/apps/chrg/applications/utils/chrg_sink.c index e691ca6..4ad8d78 100644 --- a/apps/chrg/applications/utils/chrg_sink.c +++ b/apps/chrg/applications/utils/chrg_sink.c @@ -827,7 +827,7 @@ static int chrg_sink_work_switch(eIDX_SOU_CH idx, struct chrg_switch_t *pSW) * 禁止把角色切换批次回码当作上次初始化阶段的完成结果。 */ g_sink_init_in_progress[idx] = RT_FALSE; g_sink_init_stage_submitted[idx] = RT_FALSE; - g_sink_init_stage[idx] = SINK_INIT_STAGE_CLEAR_RELAY; + g_sink_init_stage[idx] = SINK_INIT_STAGE_TEST_STOP; g_sink_init_north_relay_tick[idx] = 0U; ret = chrg_sou_com_batch_submit(idx, ®, &value, 1); diff --git a/docs/修改日志.md b/docs/修改日志.md index 8a41b35..e86bb56 100644 --- a/docs/修改日志.md +++ b/docs/修改日志.md @@ -1,5 +1,12 @@ # 修改日志 +## V1.1.32 - 2026-09-17 + +### 版本号管理 + +- 协议板版本寄存器 `0x0300` 的版本编码移至 `chrg_comm.c` 管理,当前返回 `0x0130`(V1.1.32)。 +- 应用启动日志版本更新为 `V1.1.32`。 + ## V1.1.26 - 2026-09-17 ### 修复Sink角色往返时初始化上下文残留