..
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Project.ViewForm
|
||||
|
||||
private void InitializeMapCanvas()
|
||||
{
|
||||
PUB._mapCanvas.NodeSelect += OnNodeSelected;;
|
||||
PUB._mapCanvas.NodeSelect += OnNodeSelected; ;
|
||||
// 스플리터 패널에 맵 캔버스 추가
|
||||
panel1.Controls.Add(PUB._mapCanvas);
|
||||
}
|
||||
@@ -49,8 +49,8 @@ namespace Project.ViewForm
|
||||
// [Run Mode] Left Click: AGV Operation
|
||||
if (PUB._mapCanvas.Mode == AGVNavigationCore.Controls.UnifiedAGVCanvas.CanvasMode.Run && e.Button == MouseButtons.Left)
|
||||
{
|
||||
HandleRunModeClick(mapnode);
|
||||
return;
|
||||
HandleRunModeClick(mapnode);
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.Button != MouseButtons.Right) return;
|
||||
@@ -71,7 +71,7 @@ namespace Project.ViewForm
|
||||
menu.Items.Add(pickOff);
|
||||
|
||||
// Charge
|
||||
if (mapnode.StationType == StationType.Charger1 || mapnode.StationType == StationType.Charger2)
|
||||
if (mapnode.StationType == StationType.Charger )
|
||||
{
|
||||
var charge = new ToolStripMenuItem("Charge (Move & Charge)");
|
||||
charge.Click += (s, args) => ExecuteManualCommand(mapnode, ENIGProtocol.AGVCommandHE.Charger);
|
||||
@@ -122,7 +122,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. 작업 설정
|
||||
@@ -141,7 +141,7 @@ namespace Project.ViewForm
|
||||
|
||||
PUB.AGV.DataReceive += AGV_DataReceive;
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void AGV_DataReceive(object sender, arDev.Narumi.DataEventArgs e)
|
||||
{
|
||||
@@ -185,7 +185,7 @@ namespace Project.ViewForm
|
||||
private void fAuto_VisibleChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.timer1.Enabled = this.Visible;
|
||||
if (timer1.Enabled)
|
||||
if (timer1.Enabled)
|
||||
{
|
||||
timer1.Start();
|
||||
}
|
||||
@@ -194,7 +194,7 @@ namespace Project.ViewForm
|
||||
|
||||
private void timer1_Tick_1(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void HandleRunModeClick(MapNode targetNode)
|
||||
@@ -204,7 +204,7 @@ namespace Project.ViewForm
|
||||
ENIGProtocol.AGVCommandHE targetCmd = ENIGProtocol.AGVCommandHE.Goto;
|
||||
string confirmMsg = "";
|
||||
|
||||
if (targetNode.StationType == StationType.Charger1 || targetNode.StationType == StationType.Charger2)
|
||||
if (targetNode.StationType == StationType.Charger)
|
||||
{
|
||||
if (MessageBox.Show($"[{targetNode.Id}] 충전기로 이동하여 충전을 진행하시겠습니까?", "작업 확인", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ namespace Project.ViewForm
|
||||
{
|
||||
// Loader, Unloader, Buffer, Cleaner - Pick/Drop Selection
|
||||
ContextMenuStrip menu = new ContextMenuStrip();
|
||||
|
||||
|
||||
var pickOn = new ToolStripMenuItem("Pick On (Move & Pick)");
|
||||
pickOn.Click += (s, args) => ExecuteManualCommand(targetNode, ENIGProtocol.AGVCommandHE.PickOnEnter);
|
||||
menu.Items.Add(pickOn);
|
||||
@@ -249,14 +249,14 @@ namespace Project.ViewForm
|
||||
if (PUB.sm.Step < eSMStep.IDLE) return;
|
||||
if (PUB._mapCanvas == null) return;
|
||||
tmrun = true;
|
||||
|
||||
|
||||
|
||||
var errmsg = string.Empty;
|
||||
if(PUB.AGV.IsOpen==false)
|
||||
if (PUB.AGV.IsOpen == false)
|
||||
{
|
||||
errmsg = "AGV컨트롤러 연결실패";
|
||||
}
|
||||
else if(PUB.XBE.IsOpen==false )
|
||||
else if (PUB.XBE.IsOpen == false)
|
||||
{
|
||||
errmsg = "XBEE 연결실패";
|
||||
}
|
||||
@@ -264,11 +264,11 @@ namespace Project.ViewForm
|
||||
{
|
||||
errmsg = "XBEE 통신불가";
|
||||
}
|
||||
else if(PUB.AGV.error.Value > 0)
|
||||
else if (PUB.AGV.error.Value > 0)
|
||||
{
|
||||
errmsg = PUB.AGV.error.ToString();
|
||||
}
|
||||
else if(PUB.AGV.system1.stop_by_front_detect)
|
||||
else if (PUB.AGV.system1.stop_by_front_detect)
|
||||
{
|
||||
errmsg = "전방 물체감지로 인해 정지";
|
||||
}
|
||||
@@ -276,11 +276,11 @@ namespace Project.ViewForm
|
||||
{
|
||||
errmsg = "BMS 연결실패";
|
||||
}
|
||||
else if(VAR.BOOL[eVarBool.FLAG_AUTORUN]==false)
|
||||
else if (VAR.BOOL[eVarBool.FLAG_AUTORUN] == false)
|
||||
{
|
||||
errmsg = "자동모드가 아닙니다";
|
||||
}
|
||||
|
||||
|
||||
PUB._mapCanvas.SetAlertMessage(errmsg);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user