0712提交
This commit is contained in:
@@ -3,14 +3,8 @@
|
||||
// StandbyState实现
|
||||
void StandbyState::entry() {
|
||||
PowerManagerFsm::entry();
|
||||
// pm->m_CcuColCmd.fcuCmd = FcuCommand::Stop;
|
||||
// pm->m_CcuColCmd.powerBatCmd = BatteryCommand::Stop;
|
||||
// 启动流程 仪表电一直设置为启动
|
||||
// pm->m_CcuColCmd.powerBatCmd = BatteryCommand::Start;
|
||||
// 启动设备
|
||||
pm->workCondition = WorkCondition::STANDBY;
|
||||
pm->m_driver.getSTANDBYTable(&pm->m_subDisSysCmd);
|
||||
|
||||
LOG_F(INFO, "WorkCondition %d", pm->workCondition);
|
||||
}
|
||||
void StandbyState::react(StandbyEvent const &) {
|
||||
@@ -25,40 +19,5 @@ void StandbyState::react(MasterCommandEvent const &) {
|
||||
void StandbyState::react(DevCmdExt const &e)
|
||||
{
|
||||
LOG_F(INFO, "DevCmdExt 执行");
|
||||
cout << "DevCmdExt 执行" << (int)e.id << (int)e.cmd << endl;
|
||||
PowerManagerFsm::react(e);
|
||||
cout << (int) pm->m_subDisSysCmd.commMast << endl;
|
||||
cout << (int) pm->m_subDisSysCmd.mastLiftingServo << endl;
|
||||
cout << "DevCmdExt 执行完成" << (int)e.id << (int)e.cmd << endl;
|
||||
//TODO:屏蔽上电保护
|
||||
//正常模式下,不允许执行DevCmdExt
|
||||
// if (pm->currentMod == RunMode::Normal )
|
||||
// {
|
||||
// LOG_F(INFO, "正常模式下,不允许执行DevCmdExt");
|
||||
// }
|
||||
// else if (pm->currentMod == RunMode::Test)
|
||||
// {
|
||||
// if(handPowerProtection(e))
|
||||
// PowerManagerFsm::react(e);
|
||||
// else
|
||||
// LOG_F(INFO, "DevCmdExt 执行失败");
|
||||
// }
|
||||
// else if (pm->currentMod == RunMode::Debug)
|
||||
// {
|
||||
// LOG_F(INFO, "调试模式下,直接执行DevCmdExt");
|
||||
// PowerManagerFsm::react(e);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// LOG_F(INFO, "当前模式未知");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
void StandbyState::handlePowerOn() {
|
||||
LOG_F(INFO,"动力电上电");
|
||||
//TODO: 电源上电 更新协议
|
||||
// PowerManagerFsm::pm->m_CcuColCmd.powerBatCmd = 0x10;
|
||||
// if(PowerManagerFsm::pm->m_pmCurrentState.ccustate.fcuState == 0x04)
|
||||
// PowerManagerFsm::pm->m_CcuColCmd.fcuCmd = 0x02;
|
||||
}
|
||||
Reference in New Issue
Block a user