This commit is contained in:
backuppc
2026-01-12 17:37:37 +09:00
parent 880dc526da
commit 5801137d63
12 changed files with 356 additions and 1385 deletions

View File

@@ -138,7 +138,8 @@ namespace Project
PUB.sm.SetNewRunStep(ERunStep.ERROR);
}
break;
case AGVNavigationCore.Models.StationType.Charger:
case AGVNavigationCore.Models.StationType.Charger1:
case AGVNavigationCore.Models.StationType.Charger2:
break;

View File

@@ -72,7 +72,7 @@ namespace Project.ViewForm
menu.Items.Add(pickOff);
// Charge
if (mapnode.StationType == StationType.Charger)
if (mapnode.StationType == StationType.Charger1 || mapnode.StationType == StationType.Charger2)
{
var charge = new ToolStripMenuItem("Charge (Move & Charge)");
charge.Click += (s, args) => ExecuteManualCommand(mapnode, ENIGProtocol.AGVCommandHE.Charger);
@@ -105,14 +105,14 @@ namespace Project.ViewForm
// 1. 경로 생성
var pathFinder = new AGVNavigationCore.PathFinding.Planning.AGVPathfinder(PUB._mapCanvas.Nodes);
// 현재위치에서 목표위치까지
var result = pathFinder.FindPath(PUB._virtualAGV.CurrentNode, targetNode);
//// 현재위치에서 목표위치까지
//var result = pathFinder.FindBasicPath(PUB._virtualAGV.CurrentNode, targetNode);
if (!result.Success || result.Path == null || result.Path.Count == 0)
{
MessageBox.Show("경로를 찾을 수 없습니다.");
return;
}
//if (!result.Success || result.Path == null || result.Path.Count == 0)
//{
// MessageBox.Show("경로를 찾을 수 없습니다.");
// return;
//}
// 2. 상태 설정
@@ -123,7 +123,7 @@ namespace Project.ViewForm
PUB.log.AddI($"[Manual Command] {cmd} to ({targetNode.Id})");
// FindPathResult contains DetailedPath already.
PUB._virtualAGV.SetPath(result);
// PUB._virtualAGV.SetPath(result);
PUB._virtualAGV.TargetNode = targetNode as MapNode;
// 3. 작업 설정
@@ -243,7 +243,7 @@ namespace Project.ViewForm
ENIGProtocol.AGVCommandHE targetCmd = ENIGProtocol.AGVCommandHE.Goto;
string confirmMsg = "";
if (targetNode.StationType == StationType.Charger)
if (targetNode.StationType == StationType.Charger1 || targetNode.StationType == StationType.Charger2)
{
if (MessageBox.Show($"[{targetNode.Id}] 충전기로 이동하여 충전을 진행하시겠습니까?", "작업 확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
{