增加了info字段,增加了上电检测,调整了绝缘电阻上报逻辑

This commit is contained in:
zjk
2026-02-09 14:48:58 +08:00
parent e5193bd7f7
commit 987d8b3ce0
51 changed files with 412 additions and 2289 deletions
+4 -1
View File
@@ -5,6 +5,7 @@
#include "json/json.h"
#include <bitset>
#include "../systemData.h"
class uPower_pmStateMsg
{
private:
@@ -49,7 +50,7 @@ public:
pms["faultLevel_uint8"] = data.getFaultCodeLevel();
Json::Value faultCode_array = Json::Value(Json::arrayValue);
//TODO:屏蔽所有故障
for(auto faultCode : data.getFaultCode())
{
faultCode_array.append(faultCode);
@@ -63,6 +64,8 @@ public:
pms["leakage_uint8"] = state.m_leakage;
pms["info_str"] = data.getSystemInfo();
// 转化为json格式
Json::StreamWriterBuilder writerBuilder;
writerBuilder.settings_["indentation"] = "";