订单流程添加修改

This commit is contained in:
lidg
2026-08-20 11:22:55 +08:00
parent 0c4fd6844c
commit 4e99071ce1
31 changed files with 1359 additions and 241 deletions
+39 -3
View File
@@ -38,7 +38,6 @@ bool ConfigManager::load(const QString &filePath)
m_modbusConfig.timeoutMs = settings.value("modbus/timeoutMs", m_modbusConfig.timeoutMs).toInt();
m_modbusConfig.retryCount = settings.value("modbus/retryCount", m_modbusConfig.retryCount).toInt();
m_modbusConfig.pollIntervalMs = settings.value("modbus/pollIntervalMs", m_modbusConfig.pollIntervalMs).toInt();
m_modbusConfig.commandPulseMs = settings.value("modbus/commandPulseMs", m_modbusConfig.commandPulseMs).toInt();
m_modbusConfig.feedbackTimeoutMs = settings.value("modbus/feedbackTimeoutMs", m_modbusConfig.feedbackTimeoutMs).toInt();
m_modbusConfig.reconnectDelayMs = settings.value("modbus/reconnectDelayMs", m_modbusConfig.reconnectDelayMs).toInt();
m_modbusConfig.reconnectAttempts = settings.value("modbus/reconnectAttempts", m_modbusConfig.reconnectAttempts).toInt();
@@ -59,6 +58,44 @@ bool ConfigManager::load(const QString &filePath)
addresses.currentStep = settings.value("modbus/currentStep", addresses.currentStep).toInt();
addresses.checkResult = settings.value("modbus/checkResult", addresses.checkResult).toInt();
addresses.errorCode = settings.value("modbus/errorCode", addresses.errorCode).toInt();
addresses.rackPickCommand =
settings.value("modbus/rackPickCommand", addresses.rackPickCommand).toInt();
addresses.frontLoadCommand =
settings.value("modbus/frontLoadCommand", addresses.frontLoadCommand).toInt();
addresses.inspectionCommand =
settings.value("modbus/inspectionCommand", addresses.inspectionCommand).toInt();
addresses.frontUnloadCommand =
settings.value("modbus/frontUnloadCommand", addresses.frontUnloadCommand).toInt();
addresses.flipCommand =
settings.value("modbus/flipCommand", addresses.flipCommand).toInt();
addresses.backLoadCommand =
settings.value("modbus/backLoadCommand", addresses.backLoadCommand).toInt();
addresses.backUnloadCommand =
settings.value("modbus/backUnloadCommand", addresses.backUnloadCommand).toInt();
addresses.rackPlaceCommand =
settings.value("modbus/rackPlaceCommand", addresses.rackPlaceCommand).toInt();
addresses.rackPickFeedback =
settings.value("modbus/rackPickFeedback", addresses.rackPickFeedback).toInt();
addresses.frontLoadFeedback =
settings.value("modbus/frontLoadFeedback", addresses.frontLoadFeedback).toInt();
addresses.inspectionFeedback =
settings.value("modbus/inspectionFeedback", addresses.inspectionFeedback).toInt();
addresses.frontUnloadFeedback =
settings.value("modbus/frontUnloadFeedback", addresses.frontUnloadFeedback).toInt();
addresses.flipFeedback =
settings.value("modbus/flipFeedback", addresses.flipFeedback).toInt();
addresses.backLoadFeedback =
settings.value("modbus/backLoadFeedback", addresses.backLoadFeedback).toInt();
addresses.backUnloadFeedback =
settings.value("modbus/backUnloadFeedback", addresses.backUnloadFeedback).toInt();
addresses.rackPlaceFeedback =
settings.value("modbus/rackPlaceFeedback", addresses.rackPlaceFeedback).toInt();
addresses.inspectionMode =
settings.value("modbus/inspectionMode", addresses.inspectionMode).toInt();
addresses.trayNumber =
settings.value("modbus/trayNumber", addresses.trayNumber).toInt();
addresses.slotNumber =
settings.value("modbus/slotNumber", addresses.slotNumber).toInt();
m_productionConfig.loadStep =
settings.value("production/loadStep", m_productionConfig.loadStep).toInt();
@@ -146,8 +183,7 @@ bool ConfigManager::validate(QString *error) const
if (m_modbusConfig.pollIntervalMs <= 0) {
errors.append("Modbus pollIntervalMs must be greater than 0");
}
if (m_modbusConfig.commandPulseMs <= 0
|| m_modbusConfig.feedbackTimeoutMs <= 0
if (m_modbusConfig.feedbackTimeoutMs <= 0
|| m_modbusConfig.reconnectDelayMs < 0
|| m_modbusConfig.reconnectAttempts < 0) {
errors.append("Modbus timing or retry settings are invalid");