From e0488d513b20dd6e35a8a238a7683660666d0aeb Mon Sep 17 00:00:00 2001
From: zjk <1553836110@qq.com>
Date: Wed, 26 Aug 2026 20:56:39 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=EF=BC=9A=E6=8C=890824?=
=?UTF-8?q?=E5=8D=8F=E8=AE=AE=E6=9B=B4=E6=96=B0=E5=A4=8D=E5=90=88=E7=AE=A1?=
=?UTF-8?q?=E6=8E=A7=E9=80=9A=E4=BF=A1=E8=A7=A3=E6=9E=90=20+=20=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E7=87=83=E6=96=99=E7=94=B5=E6=B1=A0=E7=9B=91=E6=8E=A7?=
=?UTF-8?q?=E7=BD=91=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- pmSysvariable/ccuUdpMsg: 域起始符改为0x40 0x40,域标识符重编号0x0001~0x0004,
ccuState/ccuColCmd/ccuSetParmCmd 按新协议字段布局与字节序重写(状态248B/操控45B/参数28B)
- systemData/httpserver: 新增FC单片电压、甲醇制氢装置、DC/DC、尾气装置、一体化罐、
供氢供氧流量、应急上浮等字段解析与WebSocket JSON推送
- 新增 /fcs 燃料电池监控页(fuelcell.h):实时数据显示 + 操控指令交互按钮,
过滤日志推送消息避免界面闪烁
- SQLite/LowerCommManager/测试:更新建表列、解析打印与单元/集成测试适配新协议
---
src/pPowerManger/PowerManger.cpp | 14 +-
.../httpserver/batteryoperation.h | 17 +-
src/pPowerManger/httpserver/data.h | 4 +-
src/pPowerManger/httpserver/fuelcell.h | 894 ++++++++++++++++++
src/pPowerManger/httpserver/httpserver.cpp | 158 +++-
src/pPowerManger/httpserver/index.h | 22 +-
src/pPowerManger/pmSysvariable.h | 307 +++---
src/pPowerManger/sqlit3/SQLite.cpp | 78 +-
src/pPowerManger/systemData.h | 176 +++-
src/pPowerManger/udpcomm/ccuUdpMsg.h | 14 +-
src/pPowerManger/udpcomm/udpComm.cpp | 14 +-
test/integration/full_feeder.cpp | 97 +-
test/until/SqliteTest.cpp | 4 +-
test/until/SystemDataTest.cpp | 8 +-
test/until/testSqlitdb.cpp | 3 +-
15 files changed, 1565 insertions(+), 245 deletions(-)
create mode 100644 src/pPowerManger/httpserver/fuelcell.h
diff --git a/src/pPowerManger/PowerManger.cpp b/src/pPowerManger/PowerManger.cpp
index c1c69cd..339836a 100644
--- a/src/pPowerManger/PowerManger.cpp
+++ b/src/pPowerManger/PowerManger.cpp
@@ -362,11 +362,19 @@ void PowerManger::initControlCmd()
//================初始化复合管控=============================
m_CcuColCmd.fcmode = 0x00; //默认无效
m_CcuColCmd.fcuCmd = 0x00; //无效指令
- m_CcuColCmd.fcuPowerEfficiency = 8; //默认为8kw
- m_CcuColCmd.insChargeEnable = 0x30; //不允许充电
+ m_CcuColCmd.fcuPowerEfficiency = 0; //输出功率指令,0~250,分辨率0.1kW
+ m_CcuColCmd.pitchData1 = 0; //纵倾姿态数据1
+ m_CcuColCmd.pitchData2 = 0; //纵倾姿态数据2
+ m_CcuColCmd.rollData1 = 0; //横倾姿态数据1
+ m_CcuColCmd.rollData2 = 0; //横倾姿态数据2
+ m_CcuColCmd.emergencyAllow = 0; //应急允许
+ m_CcuColCmd.depth = 0; //潜深深度
+ m_CcuColCmd.supplyExhaustCmd = 0x00; //补给/排放指令
+ m_CcuColCmd.reservedCmd5 = 0; //预留指令5
+ m_CcuColCmd.reservedCmd6 = 0; //预留指令6
m_CcuColCmd.insBatCmd = 0x00; //无效指令
m_CcuColCmd.powerBatCmd = 0x00; //无效指令
- m_CcuColCmd.powerBatEfficiency = 00; //默认为最大
+ m_CcuColCmd.powerBatEfficiency = 0; //动力锂电池功率配置值
m_CcuColCmd.heartbeat = 0;
m_CcuColCmd.masterState = 0xAA;//主站状态,运行中
//================初始化上位机指令=========================
diff --git a/src/pPowerManger/httpserver/batteryoperation.h b/src/pPowerManger/httpserver/batteryoperation.h
index a983ed5..4e18efa 100644
--- a/src/pPowerManger/httpserver/batteryoperation.h
+++ b/src/pPowerManger/httpserver/batteryoperation.h
@@ -265,6 +265,10 @@ body {
电池操作
+