Refactor AGV error handling: Standardize AGVErrorCode usage and update SetRunStepError
This commit is contained in:
@@ -183,6 +183,10 @@ namespace Project.Device
|
||||
/// <param name="errcode"></param>
|
||||
public void SendError(ENIGProtocol.AGVErrorCode errcode, string errormessage)
|
||||
{
|
||||
// Update global error state so it persists in Status messages
|
||||
PUB.Result.RunStepErrorCode = errcode;
|
||||
PUB.Result.ResultMessage = errormessage;
|
||||
|
||||
var id = PUB.setting.XBE_ID;
|
||||
byte cmd = (byte)ENIGProtocol.AGVCommandEH.Error;
|
||||
if (errormessage.Length > 30) errormessage = errormessage.Substring(0, 29);
|
||||
|
||||
Reference in New Issue
Block a user