调试0723
This commit is contained in:
@@ -33,7 +33,7 @@ void PowerManagerFsm::react(CycleTriggeredEvent const &){
|
||||
//非调试模式下,对水声设备进行保护
|
||||
if(pm->currentMod != PMMode::Debug)
|
||||
{
|
||||
if(pm->m_depth > 10)
|
||||
if(pm->m_depth < OVER_DEPTH)
|
||||
{
|
||||
if(pm->m_systemData->power_a_bus_status.xczCircuitBreaker == 1)
|
||||
pm->m_lowerCommManager->operate_HVA_xczCircuit_Breaker(0);
|
||||
@@ -100,7 +100,6 @@ void PowerManagerFsm::handleCuriseWork()
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowRudderDeploy, (unsigned char)cmd);
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowRudderServo1, (unsigned char)cmd);
|
||||
pm->m_upperCommManager->processPeriodicTasks();
|
||||
MOOSPause(3);
|
||||
pm->m_lowerCommManager->operate_HVA_bowRudderControlBoxCircuit_Breaker(1);
|
||||
}
|
||||
//2.2 桅杆舵机
|
||||
@@ -108,7 +107,6 @@ void PowerManagerFsm::handleCuriseWork()
|
||||
{
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::mastLiftingServo, (unsigned char)cmd);
|
||||
pm->m_upperCommManager->processPeriodicTasks();
|
||||
MOOSPause(3);
|
||||
pm->m_lowerCommManager->operate_HVA_mastSteeringGearControlBoxCircuit_Breaker(1);
|
||||
}
|
||||
//2.3 艏部浮调机构
|
||||
@@ -118,7 +116,6 @@ void PowerManagerFsm::handleCuriseWork()
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::buoyancyAdjust2, (unsigned char)cmd);
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::buoyancyAdjust3, (unsigned char)cmd);
|
||||
pm->m_upperCommManager->processPeriodicTasks();
|
||||
MOOSPause(3);
|
||||
pm->m_lowerCommManager->operate_HVA_bowFTDevice123Circuit_Breaker(1);
|
||||
}
|
||||
//2.4 艉部浮调机构
|
||||
@@ -127,7 +124,6 @@ void PowerManagerFsm::handleCuriseWork()
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::buoyancyAdjust4, (unsigned char)cmd);
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::buoyancyAdjust5, (unsigned char)cmd);
|
||||
pm->m_upperCommManager->processPeriodicTasks();
|
||||
MOOSPause(3);
|
||||
pm->m_lowerCommManager->operate_HV_sternFt45_Breaker(1);
|
||||
}
|
||||
//2.5 推进电机
|
||||
@@ -168,14 +164,25 @@ void PowerManagerFsm::handleHydroacousticDeviceCmd(int id , int cmd)
|
||||
{
|
||||
if (pm->currentMod != PMMode::Debug)
|
||||
{
|
||||
if(pm->m_depth < 10)
|
||||
if(pm->m_depth < OVER_DEPTH)
|
||||
{
|
||||
LOG_F(INFO, "水下设备操作上电保护 %d ", id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, (DeviceId::Type)id, (unsigned char)cmd);
|
||||
// 如果是前视声纳断电则先关机再断电
|
||||
if(id == DeviceId::forwardSonar)
|
||||
{
|
||||
if(cmd == 0)
|
||||
{
|
||||
LOG_F(INFO,"前视声纳关机指令");
|
||||
pm->sendNotification("uExternComm_frontSonarControl_cmd","0");
|
||||
MOOSPause(10000);
|
||||
}
|
||||
}
|
||||
LOG_F(INFO, "水声设备操作: %d, %d", DeviceId::toString((DeviceId::Type)id), id, cmd);
|
||||
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, (DeviceId::Type)id, (unsigned char)cmd);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -717,7 +724,7 @@ void PowerManagerFsm::handleSideSonarCmd(int id, int cmd)
|
||||
{
|
||||
if (pm->currentMod != PMMode::Debug)
|
||||
{
|
||||
if(pm->m_depth < 10)
|
||||
if(pm->m_depth < OVER_DEPTH)
|
||||
{
|
||||
LOG_F(INFO, "水下设备操作上电保护 %d ", id);
|
||||
return;
|
||||
@@ -891,7 +898,6 @@ void PowerManagerFsm::react(DevCmdExt const &e)
|
||||
|
||||
void PowerManagerFsm::getNoPowerDeviceStatus(DriverTable &s)
|
||||
{
|
||||
s.bowThrow = pm->m_subDisSysState.bowThrow;
|
||||
s.commMast = pm->m_subDisSysState.commMast;
|
||||
s.ctd1 = pm->m_subDisSysState.ctd1;
|
||||
s.ctd2 = pm->m_subDisSysState.ctd2;
|
||||
@@ -922,6 +928,8 @@ void PowerManagerFsm::getNoPowerDeviceStatus(DriverTable &s)
|
||||
s.waterInject = pm->m_subDisSysState.waterInject;
|
||||
s.USBL = pm->m_subDisSysState.USBL;
|
||||
s.lowFreqSonar = pm->m_subDisSysState.lowFreqSonar;
|
||||
s.sternThrow = pm->m_subDisSysState.sternThrow;
|
||||
s.bowThrow = pm->m_subDisSysState.bowThrow;
|
||||
}
|
||||
|
||||
void PowerManagerFsm::getBowRudderSystemStatus(DriverTable &s)
|
||||
|
||||
Reference in New Issue
Block a user