0712提交

This commit is contained in:
zjk
2025-07-12 15:39:28 +08:00
parent 4116397f3e
commit 2ef5fd92ac
32 changed files with 3601 additions and 458 deletions
+66 -4
View File
@@ -7,15 +7,77 @@ void ShoreBasedReady::react(MasterCommandEvent const &) {
PowerManagerFsm::handleWorkCmd();
}
void ShoreBasedReady::entry() {
PowerManagerFsm::entry();
pm->m_driver.getSHORE_BASED_READYable(&pm->m_subDisSysCmd);
// pm->m_CcuColCmd.powerBatCmd = BatteryCommand::Start;
pm->workCondition = WorkCondition::CHANING;
//依次接入执行机构动力电设备
//TODO:接入执行机构动力电设备
//1. 开启动力电
//1.1 动力锂电池上电
pm->m_CcuColCmd.powerBatCmd = BatteryCommand::Start;
//1.2 闭合动力电断路器
pm->m_lowerCommManager->operate_HV_powerLithiumBattery_Breaker(1);
MOOSPause(3);
pm->m_lowerCommManager->operate_HV_dcDc5Module_Breaker(1);
MOOSPause(3);
pm->m_lowerCommManager->operate_HV_dcDc5_Breaker(1);
pm->m_lowerCommManager->operate_HV_coolingSystem_Breaker(1);
MOOSPause(10);
pm->m_lowerCommManager->operate_HV_bowHighVoltageBox_Breaker(1);
MOOSPause(3);
//2. 启动动力电设备
unsigned char cmd = 1;
//2.1 启闭机构
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover1, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover2, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover3, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover4, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover5, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowCover6, (unsigned char)cmd);
pm->m_upperCommManager->processPeriodicTasks();
MOOSPause(3);
pm->m_lowerCommManager->operate_HVA_actuatorCircuit_Breaker(1);
//2.2 敞水电缸
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet1, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet2, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet3, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet4, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet5, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet6, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet7, (unsigned char)cmd);
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::bowWaterInet8, (unsigned char)cmd);
pm->m_upperCommManager->processPeriodicTasks();
MOOSPause(3);
pm->m_lowerCommManager->operate_HVA_openWaterCoverStartCylinderCircuit_Breaker(1);
//2.3 艏舵
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.4 桅杆舵机
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.5 艏部浮调机构
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::buoyancyAdjust1, (unsigned char)cmd);
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.6 艉部浮调机构
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.7 推进电机
pm->m_driver.setDeviceState(pm->m_subDisSysCmd, DeviceId::thruster, (unsigned char)cmd);
pm->m_upperCommManager->processPeriodicTasks();
MOOSPause(3);
pm->m_lowerCommManager->operate_HV_propulsionMotor_Breaker(1);
pm->workCondition = WorkCondition::SHORE_BASED_READY;
LOG_F(INFO, "进入岸基备航状态");
}