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:
@@ -213,12 +213,15 @@ namespace Project.Device
|
||||
/*
|
||||
Mode[1] : 0=manual, 1=auto
|
||||
RunSt[1] : 0=stop, 1=run, 2=error
|
||||
Diection[1] : 0=straight, 1=left, 2=right, 3=markstop
|
||||
Inposition[1] : 0=off, 1=on : 목적위치에 도달완료 시 설정 이동 이동시 OFF됨
|
||||
RunStep[1] : (byte)PUB.sm.RunStep
|
||||
RunStepSeq[1] : (byte)StepMC
|
||||
MotorDir[1] : 0=F(Forward), 1=B(Backward)
|
||||
MagnetDir[1] : 0=S(Straight), 1=L(Left), 2=R(Right)
|
||||
ChargeSt[1] : 0=off, 1=on
|
||||
CartSt[1] : 0=off, 1=on, 2=unknown
|
||||
LiftSt[1] : 0=down , 1=up, 2=unknown
|
||||
LastTag[6] : "000000"
|
||||
ErrorCode[1] : (byte)PUB.Result.ResultErrorCode
|
||||
LastTag[4] : "0000"
|
||||
*/
|
||||
try
|
||||
{
|
||||
@@ -288,6 +291,10 @@ namespace Project.Device
|
||||
value = 2; // unknown (기본값)
|
||||
data.Add(value);
|
||||
|
||||
// ErrorCode [New RunStepErrorCode]
|
||||
value = (byte)PUB.Result.RunStepErrorCode;
|
||||
data.Add(value);
|
||||
|
||||
// LastTag
|
||||
string lastTag = PUB.AGV.data.TagNo.ToString("0000") ?? "0000";
|
||||
byte[] tagBytes = Encoding.ASCII.GetBytes(lastTag.PadRight(4, '0'));
|
||||
|
||||
Reference in New Issue
Block a user