|
@@ -439,10 +439,7 @@ BOOL RecipeContext::judgeStep()
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
- if (mainStepList.get(currentStepNo) == NULL)
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
+
|
|
|
// b)currentStepNo指定的当前步骤的isJumpStep为TRUE
|
|
|
// i.根据jumpStepName(在主recipe中)找到jumpStepNo
|
|
|
// ii.找到了设置currentStepNo = jumpStepNo,否则函数返回FALSE
|
|
@@ -508,6 +505,7 @@ BOOL RecipeContext::judgeStep()
|
|
|
mainStepList.get(currentStepNo)->elapsedSubRecipeLoopCount++;
|
|
|
currentRecipeType = currentRecipeTypeValue::SubRecipe;
|
|
|
currentOtherStepNo = 0;
|
|
|
+ currentOtherRecipeKey = currentStepNo;//key 也需要设置
|
|
|
continue;
|
|
|
}
|
|
|
else
|
|
@@ -531,10 +529,7 @@ BOOL RecipeContext::judgeStep()
|
|
|
// 1.currentRecipeType = NormalRecipe
|
|
|
// 2.返回(1)继续循环(进入normal recipe的调用步骤)
|
|
|
char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
- if (subStepListMap.get(cork) == NULL)
|
|
|
- {
|
|
|
- return false;
|
|
|
- }
|
|
|
+
|
|
|
if (currentOtherStepNo >= (*subStepListMap.get(cork)).size())
|
|
|
{
|
|
|
currentRecipeType = currentRecipeTypeValue::NormalRecipe;
|
|
@@ -974,7 +969,26 @@ void RecipeContext::updateTime(BOOL newStep)
|
|
|
if (newStep)
|
|
|
{
|
|
|
elapsedStepTime = 0;
|
|
|
- remainStepTime = mainStepList.get(currentStepNo)->time;
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::NormalRecipe)
|
|
|
+ {
|
|
|
+ remainStepTime = mainStepList.get(currentStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::SubRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainStepTime = (subStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::AlarmRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainStepTime = (alarmStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::AbortRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainStepTime = (abortStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+
|
|
|
if (remainStepTime == 0)
|
|
|
{
|
|
|
int currentstepno_c = currentStepNo;
|
|
@@ -985,7 +999,26 @@ void RecipeContext::updateTime(BOOL newStep)
|
|
|
{
|
|
|
if (next())
|
|
|
{
|
|
|
- remainTotalTime += mainStepList.get(currentStepNo)->time;
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::NormalRecipe)
|
|
|
+ {
|
|
|
+ remainTotalTime += mainStepList.get(currentStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::SubRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainTotalTime += (subStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::AlarmRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainTotalTime += (alarmStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+ if (currentRecipeType == currentRecipeTypeValue::AbortRecipe)
|
|
|
+ {
|
|
|
+ char* cork = CovertIntToChar(currentOtherRecipeKey);
|
|
|
+ remainTotalTime += (abortStepListMap.get(cork))->get(currentOtherStepNo)->time;
|
|
|
+ }
|
|
|
+ //remainTotalTime += mainStepList.get(currentStepNo)->time;
|
|
|
}
|
|
|
else
|
|
|
{
|