1.ProcessStart后,停止再启动软件,不能创建调度任务,需要重启软件。修复:启动时复位千传相关变是。注:待测试验证。
已修改1个文件
42 ■■■■■ 文件已修改
SourceCode/Bond/Servo/CMaster.cpp 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SourceCode/Bond/Servo/CMaster.cpp
@@ -372,6 +372,20 @@
            return -1;
        }
        lock();
        // Ensure stale transfer state does not leak across runs.
        m_nContinuousTransferStep = CTStep_Unknow;
        m_nContinuousWorkingPort = 0;
        m_nContinuousWorkingSlot = 0;
        if (m_pActiveRobotTask != nullptr) {
            LOGW("<Master>start: stale active robot task found in READY, clearing it.");
            delete m_pActiveRobotTask;
            m_pActiveRobotTask = nullptr;
        }
        unlock();
        LOGI("<Master>start reset transfer state(step=%d, port=%d, slot=%d).",
            m_nContinuousTransferStep, m_nContinuousWorkingPort, m_nContinuousWorkingSlot);
        m_bContinuousTransfer = false;
        m_bBatch = false;
        setState(MASTERSTATE::STARTING);
@@ -386,6 +400,20 @@
            return -1;
        }
        lock();
        // Continuous transfer must start from a clean state every time.
        m_nContinuousTransferStep = CTStep_Unknow;
        m_nContinuousWorkingPort = 0;
        m_nContinuousWorkingSlot = 0;
        if (m_pActiveRobotTask != nullptr) {
            LOGW("<Master>startContinuousTransfer: stale active robot task found in READY, clearing it.");
            delete m_pActiveRobotTask;
            m_pActiveRobotTask = nullptr;
        }
        unlock();
        LOGI("<Master>startContinuousTransfer reset transfer state(step=%d, port=%d, slot=%d).",
            m_nContinuousTransferStep, m_nContinuousWorkingPort, m_nContinuousWorkingSlot);
        m_bContinuousTransfer = true;
        m_bBatch = false;
        setState(MASTERSTATE::STARTING);
@@ -400,6 +428,20 @@
            return -1;
        }
        lock();
        // Keep behavior consistent with other start paths.
        m_nContinuousTransferStep = CTStep_Unknow;
        m_nContinuousWorkingPort = 0;
        m_nContinuousWorkingSlot = 0;
        if (m_pActiveRobotTask != nullptr) {
            LOGW("<Master>startBatch: stale active robot task found in READY, clearing it.");
            delete m_pActiveRobotTask;
            m_pActiveRobotTask = nullptr;
        }
        unlock();
        LOGI("<Master>startBatch reset transfer state(step=%d, port=%d, slot=%d).",
            m_nContinuousTransferStep, m_nContinuousWorkingPort, m_nContinuousWorkingSlot);
        m_bContinuousTransfer = false;
        m_bBatch = true;
        setState(MASTERSTATE::STARTING);