优化了测试界面

This commit is contained in:
zjk
2025-02-08 15:12:08 +08:00
parent 6f5de4b614
commit e072f2b9d4
6 changed files with 173 additions and 37 deletions
+5 -8
View File
@@ -100,13 +100,12 @@ bool PowerManger::OnConnectToServer()
bool PowerManger::Iterate()
{
AppCastingMOOSApp::Iterate();
//1. 更新当前状态
updatePmState();
updateTime();
//2. 运行状态机
m_fsm.run(m_pmState,this);
// cout <<"CURRENT STATE:" << m_pmState.name << " | CURRENT EVENT :" << m_pmEvent << endl;
AppCastingMOOSApp::Iterate();
//3. 输出报告
buildPowerSysReport();
//4. 打印错误信息
@@ -796,12 +795,10 @@ int PowerManger::handleInite_s1(FSM_State &fsm, void* pData)
double StartTime = pm->GetAppStartTime();
while (!pm->m_connected)
{
disHighVolBusCmd a;
a.fuelCellCircuitBreaker = DIS_BREAKER_OFF;
a.propulsionMotorCircuitBreaker = DIS_BREAKER_OFF;
pm->m_udpComm.sendDisSysCmd(a);
// disHighVolBusCmd a;
// a.fuelCellCircuitBreaker = DIS_BREAKER_OFF;
// a.propulsionMotorCircuitBreaker = DIS_BREAKER_OFF;
// pm->m_udpComm.sendDisSysCmd(a);
MOOSPause(1000);
pm->updateTime();
double dft = abs(pm->m_current_time - StartTime);
+14
View File
@@ -91,6 +91,20 @@ typedef struct ccuState
float placeholder5;
} ccuState;
//TODO:增加复合管控的控制指令
// typedef struct ccuCmd
// {
// unsigned char currentWorkCondition;
// unsigned char fcuState;
// unsigned char fcuFaultLeve;
// } ccuCmd;
typedef struct ccuParamCmd
{
unsigned char insBat1Hold;
unsigned char insBat2Hold;
unsigned char insBat3Hold;
}ccuParamCmd;
typedef struct disHighVolBusState
{
unsigned char fuelCellCircuitBreaker;