帮我把下列代码的PM_XXX内容和 WORK_XXX 内容的位置进行调换 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 15:05:18 浏览: 69
FMaPM.rar_FM PM_FM调制解调_PM-KB代码_fm解调_matlab fm pm
5星 · 资源好评率100%
调换后的代码如下:
```
switch (nThirdStepMode)
{
case WORK_HOLD:
{
nStepMode = PM_STEP_REST;
}
break;
case WORK_HOLD_RANDOM:
{
nStepMode = PM_STEP_RANDOM_REST;
}
break;
case WORK_PAUSE:
{
nStepMode = PM_STEP_PAUSE;
}
break;
case WORK_CP:
{
nStepMode = PM_CONST_POWER_CHARGE;
}
break;
case WORK_DP:
{
nStepMode = PM_CONST_POWER_DISCHARGE;
}
break;
case WORK_CR:
{
nStepMode = PM_CONST_RESISTANCE_CHARGE;
}
break;
case WORK_DR:
{
nStepMode = PM_CONST_RESISTANCE_DISCHARGE;
}
break;
case WORK_CC:
{
nStepMode = PM_CONST_CURRENT_CHARGE;
}
break;
case WORK_DC:
{
nStepMode = PM_CONST_CURRENT_DISCHARGE;
}
break;
case WORK_CRATE:
{
nStepMode = PM_STEP_C_RATE_CHARGE;
}
break;
case WORK_DRATE:
{
nStepMode = PM_STEP_C_RATE_DISCHARGE;
}
break;
case WORK_CCCV:
{
nStepMode = PM_STEP_CCCV_CHARGE;
}
break;
case WORK_DCDV:
{
nStepMode = PM_STEP_CCCV_DISCHARGE;
}
break;
case WORK_CV:
{
nStepMode = PM_CONST_VOLT_CHARGE;
}
break;
case WORK_DV:
{
nStepMode = PM_CONST_VOLT_DISCHARGE;
}
break;
case WORK_CRATECV:
{
nStepMode = PM_STEP_RATE_CV_CHARGE;
}
break;
case WORK_DRATEDV:
{
nStepMode = PM_STEP_RATE_CV_DISCHARGE;
}
break;
case WORK_CPCV:
{
nStepMode = PM_STEP_CPCV_CHARGE;
}
break;
case WORK_DPDV:
{
nStepMode = PM_STEP_CPCV_DISCHARGE;
}
break;
case WORK_WHILE:
{
nStepMode = PM_STEP_LOOP;
}
break;
case PM_UNKNOWN_MODE:
case PM_STEP_SYN_SUSPEND:
case PM_STEP_STOP_X:
default:
{
// 无法识别的第三方工步号
return false;
}
break;
}
```
阅读全文