Refactor AGV error handling: Standardize AGVErrorCode usage and update SetRunStepError

This commit is contained in:
backuppc
2026-01-28 16:45:24 +09:00
parent 16d51a2712
commit 00cc0ef5b7
12 changed files with 94 additions and 84 deletions

View File

@@ -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);