feat: Implement RunStep error reporting and refactor charge sequences

- Added RunStepErrorCode to Xbee status protocol and CResult.

- Defined detailed operational error codes in EnumData.cs.

- Updated _SM_RUN_*.cs to report specific error codes before proper error transitions.

- Renamed and refactored charge-related sequence files.
This commit is contained in:
backuppc
2026-01-28 15:41:03 +09:00
parent ffa6c2fb23
commit 5b4fdd33cf
16 changed files with 383 additions and 424 deletions

View File

@@ -102,7 +102,7 @@ namespace Project
switch (PUB.sm.RunStep)
{
case ERunStep.GOHOME:
if (_SM_RUN_GOHOME(runStepisFirst, PUB.sm.GetRunSteptime) == true)
if (_SM_RUN_GOTO_HOME(runStepisFirst, PUB.sm.GetRunSteptime) == true)
{
PUB.log.Add($"홈 이동이 완료되어 준비상태로 전환합니다");
PUB.sm.SetNewRunStep(ERunStep.READY);
@@ -185,7 +185,7 @@ namespace Project
PUB.sm.ResetRunStepSeq();
PUB.log.Add("충전 명령 시작");
}
else if (_SM_RUN_GOCHARGE(runStepisFirst, PUB.sm.GetRunSteptime))
else if (_SM_RUN_CHARGE_GO(runStepisFirst, PUB.sm.GetRunSteptime))
{
PUB.Speak(Lang.);
PUB.sm.SetNewRunStep(ERunStep.CHARGECHECK);
@@ -199,7 +199,7 @@ namespace Project
VAR.TIME.Update(eVarTime.ChargeStart);
LastCommandTime = DateTime.Now;
}
else if (_SM_RUN_GOCHARGECHECK(runStepisFirst, PUB.sm.GetRunSteptime))
else if (_SM_RUN_CHARGE_CHECK(runStepisFirst, PUB.sm.GetRunSteptime))
{
//충전상태가 활성화되었으므로 대기상태로 전환한다
PUB.sm.SetNewRunStep(ERunStep.READY);
@@ -216,7 +216,7 @@ namespace Project
else
{
//충전 상태가 OFF되어야 동작하게한다
if (_SM_RUN_CHGOFF(isFirst, stepTime) == true)
if (_SM_RUN_CHARGE_GOFF(isFirst, stepTime) == true)
{
//충전상태가 활성화되었으므로 대기상태로 전환한다
PUB.sm.ClearRunStep();