帮我把下列代码的case后内容和 “nStepMode =” 后的内容进行调换 switch (nThirdStepMode) { case PM_UNKNOWN_MODE: { // 无法识别的第三方工步号 return false; } break; case PM_STEP_REST: { nStepMode = WORK_HOLD; } break; case PM_STEP_RANDOM_REST: { nStepMode = WORK_HOLD_RANDOM; } break; case PM_STEP_SYN_SUSPEND: { // 无法识别的第三方工步号 return false; } break; case PM_STEP_PAUSE: { nStepMode = WORK_PAUSE; } break; case PM_STEP_STOP_X: { // 无法识别的第三方工步号 return false; } break; case PM_CONST_POWER_CHARGE: { nStepMode = WORK_CP; } break; case PM_CONST_POWER_DISCHARGE: { nStepMode = WORK_DP; } break; case PM_CONST_RESISTANCE_CHARGE: { nStepMode = WORK_CR; } break; case PM_CONST_RESISTANCE_DISCHARGE: { nStepMode = WORK_DR; } break; case PM_STEP_INCUBATOR_LINK: { // TODO:处理 温箱联动 return false; } break; case PM_CONST_CURRENT_CHARGE: { nStepMode = WORK_CC; } break; case PM_CONST_CURRENT_DISCHARGE: { nStepMode = WORK_DC; } break; case PM_STEP_C_RATE_CHARGE: { nStepMode = WORK_CRATE; } break; case PM_STEP_C_RATE_DISCHARGE: { nStepMode = WORK_DRATE; } break; case PM_STEP_CCCV_CHARGE: // carefully! { nStepMode = WORK_CCCV; } break; case PM_STEP_CCCV_DISCHARGE: // carefully! { nStepMode = WORK_DCDV; } break; case PM_CONST_VOLT_CHARGE: { nStepMode = WORK_CV; } break; case PM_CONST_VOLT_DISCHARGE: // support lmtPara from V7206 { nStepMode = WORK_DV; } break; case PM_STEP_RATE_CV_CHARGE: { nStepMode = WORK_CRATECV; } break; case PM_STEP_RATE_CV_DISCHARGE: { nStepMode = WORK_DRATEDV; } break; case PM_STEP_CPCV_CHARGE: { nStepMode = WORK_CPCV; } break; case PM_STEP_CPCV_DISCHARGE: { nStepMode = WORK_DPDV; } break; case PM_STEP_LOOP: { nStepMode = WORK_WHILE; } break; default: { // 无法识别的第三方工步号 return false; } break; }
时间: 2024-02-15 17:05:13 浏览: 60
调换后的代码如下所示:
```
switch (nThirdStepMode) {
case PM_UNKNOWN_MODE:
// 无法识别的第三方工步号
return false;
break;
case PM_STEP_REST:
nStepMode = WORK_HOLD;
break;
case PM_STEP_RANDOM_REST:
nStepMode = WORK_HOLD_RANDOM;
break;
case PM_STEP_SYN_SUSPEND:
// 无法识别的第三方工步号
return false;
break;
case PM_STEP_PAUSE:
nStepMode = WORK_PAUSE;
break;
case PM_STEP_STOP_X:
// 无法识别的第三方工步号
return false;
break;
case PM_CONST_POWER_CHARGE:
nStepMode = WORK_CP;
break;
case PM_CONST_POWER_DISCHARGE:
nStepMode = WORK_DP;
break;
case PM_CONST_RESISTANCE_CHARGE:
nStepMode = WORK_CR;
break;
case PM_CONST_RESISTANCE_DISCHARGE:
nStepMode = WORK_DR;
break;
case PM_STEP_INCUBATOR_LINK:
// TODO:处理 温箱联动
return false;
break;
case PM_CONST_CURRENT_CHARGE:
nStepMode = WORK_CC;
break;
case PM_CONST_CURRENT_DISCHARGE:
nStepMode = WORK_DC;
break;
case PM_STEP_C_RATE_CHARGE:
nStepMode = WORK_CRATE;
break;
case PM_STEP_C_RATE_DISCHARGE:
nStepMode = WORK_DRATE;
break;
case PM_STEP_CCCV_CHARGE:
nStepMode = WORK_CCCV;
break;
case PM_STEP_CCCV_DISCHARGE:
nStepMode = WORK_DCDV;
break;
case PM_CONST_VOLT_CHARGE:
nStepMode = WORK_CV;
break;
case PM_CONST_VOLT_DISCHARGE:
nStepMode = WORK_DV;
break;
case PM_STEP_RATE_CV_CHARGE:
nStepMode = WORK_CRATECV;
break;
case PM_STEP_RATE_CV_DISCHARGE:
nStepMode = WORK_DRATEDV;
break;
case PM_STEP_CPCV_CHARGE:
nStepMode = WORK_CPCV;
break;
case PM_STEP_CPCV_DISCHARGE:
nStepMode = WORK_DPDV;
break;
case PM_STEP_LOOP:
nStepMode = WORK_WHILE;
break;
default:
// 无法识别的第三方工步号
return false;
break;
}
```
阅读全文