LAPTOP-SNT8I5JK\Boounion
2025-09-04 1efb832676e8ad27e7a495dba6ffc19479e0c76f
SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -188,12 +188,13 @@
         // master recipe list report
         CEqReadStep* pStep = new CEqReadStep(0x12955, 255 * 2,
            [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
               CEqReadStep* pTmpStep = (CEqReadStep*)pFrom;
               short ret = MRLRC_OK;
               if (code == ROK && pszData != nullptr && size > 0) {
                  // 此处解释配方数据
                  short ret = decodeRecipeListReport(pszData, size);
                  pStep->setReturnCode(ret);
                  ret = decodeRecipeListReport(pszData, size);
               }
               pStep->setReturnCode(MRLRC_OK);
               pTmpStep->setReturnCode(ret);
               return -1;
            });
         pStep->setName(STEP_EQ_MASTER_RECIPE_LIST);
@@ -206,33 +207,34 @@
      {
         // 请求配方参数
         //CEqWriteStep* pStep = new CEqWriteStep();
         //pStep->setName(STEP_EQ_RECIPE_PARAMETER_REQ);
         //pStep->setWriteSignalDev(0x967);
         //pStep->setDataDev(0x379b);
         //if (addStep(STEP_ID_RECIPE_PARAMETER_CMD_REPLY, pStep) != 0) {
         //   delete pStep;
         //}
         CEqWriteStep* pStep = new CEqWriteStep();
         pStep->setName(STEP_EQ_RECIPE_PARAMETER_REQ);
         pStep->setWriteSignalDev(0x967);
         pStep->setDataDev(0x24fb);
         if (addStep(STEP_ID_RECIPE_PARAMETER_CMD_REPLY, pStep) != 0) {
            delete pStep;
         }
      }
      {
         // recipe parameter report
         //CEqReadStep* pStep = new CEqReadStep(0x1aa54, 257 * 2,
         //   [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
         //      if (code == ROK && pszData != nullptr && size > 0) {
         //         // 此处解释配方数据
         //         short ret = decodeRecipeParameterReport(pszData, size);
         //         pStep->setReturnCode(ret);
         //      }
         //      pStep->setReturnCode(MRLRC_OK);
         //      return -1;
         //   });
         //pStep->setName(STEP_EQ_RECIPE_PARAMETER);
         //pStep->setWriteSignalDev(0x94c);
         //pStep->setReturnDev(m_nIndex == 0 ? 0x126c : 0x1bbc);
         //if (addStep(STEP_ID_RECIPE_PARAMETER_REPORT, pStep) != 0) {
         //   delete pStep;
         //}
         CEqReadStep* pStep = new CEqReadStep(0x12a54, 257 * 2,
            [&](void* pFrom, int code, const char* pszData, size_t size) -> int {
               CEqReadStep* pTmpStep = (CEqReadStep*)pFrom;
               if (code == ROK && pszData != nullptr && size > 0) {
                  // 此处解释配方数据
                  short ret = decodeRecipeParameterReport(pszData, size);
                  pTmpStep->setReturnCode(ret);
               }
               pTmpStep->setReturnCode(MRLRC_OK);
               return -1;
            });
         pStep->setName(STEP_EQ_RECIPE_PARAMETER);
         pStep->setWriteSignalDev(0x94c);
         pStep->setReturnDev(0x250c);
         if (addStep(STEP_ID_RECIPE_PARAMETER_REPORT, pStep) != 0) {
            delete pStep;
         }
      }
      // 使用CEqReadStep替换CEqJobEventStep
@@ -421,4 +423,46 @@
      if (pGlass == nullptr) return false;
      return pGlass->isProcessed(m_nID, getSlotUnit(slot));
   }
   int CBakeCooling::parsingParams(const char* pszData, size_t size, std::vector<CParam>& params)
   {
      ASSERT(pszData);
      if (size < 250) return 0;
      int i = 0, v;
      // 1.A_腔烘烤时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("A_腔烘烤时间", "", "", v * 0.01f));
      i += 2;
      // 2.A_腔冷却时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("A_腔冷却时间", "", "", v * 0.01f));
      i += 2;
      // 3.B_腔烘烤时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("B_腔烘烤时间", "", "", v * 0.01f));
      i += 2;
      // 4.BB_腔冷却时间
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("B_腔冷却时间", "", "", v * 0.01f));
      i += 2;
      // 5.A_烘烤温度设定
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("A_烘烤温度设定", "", "", v * 0.1f));
      i += 2;
      // 6.B_烘烤温度设定
      v = (pszData[i] & 0xff) | (pszData[i + 1] & 0xff) << 8;
      params.push_back(CParam("B_烘烤温度设定", "", "", v * 0.1f));
      i += 2;
      return (int)params.size();
   }
}