Implement ACS Command Handlers (PickOn, PickOff, Charge), Manual Mode Safety, and Map UI Commands

This commit is contained in:
2025-12-13 02:40:55 +09:00
parent 703e1387bf
commit 34b038c4be
25 changed files with 1992 additions and 295 deletions

View File

@@ -9,6 +9,7 @@ using Project.StateMachine;
using COMM;
using AR;
using AGVNavigationCore.Models;
using AGVNavigationCore.Controls;
namespace Project
{
@@ -60,6 +61,20 @@ namespace Project
//if (chg_run && PUB.AGV.system1.agv_run) PUB.Speak("이동을 시작 합니다");
VAR.BOOL[eVarBool.AGVDIR_BACK] = PUB.AGV.data.Direction == 'B';
// [Sync] Update VirtualAGV Direction
var syncDir = PUB.AGV.data.Direction == 'B' ? AgvDirection.Backward : AgvDirection.Forward;
if (PUB._virtualAGV.CurrentDirection != syncDir)
PUB.UpdateAGVDirection(syncDir);
// [Sync] Update VirtualAGV State
AGVState syncState = AGVState.Idle;
if (PUB.AGV.error.Value > 0) syncState = AGVState.Error;
else if (PUB.AGV.system1.Battery_charging) syncState = AGVState.Charging;
else if (PUB.AGV.system1.agv_run) syncState = AGVState.Moving;
if (PUB._virtualAGV.GetCurrentState() != syncState)
PUB.UpdateAGVState(syncState);
if (VAR.BOOL[eVarBool.AGV_ERROR] != (agv_err > 0))
{
VAR.BOOL[eVarBool.AGV_ERROR] = (agv_err > 0);