..
This commit is contained in:
@@ -10,12 +10,13 @@ using System.Windows.Forms;
|
||||
using Project.StateMachine;
|
||||
using COMM;
|
||||
using AR;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace Project.ViewForm
|
||||
{
|
||||
public partial class fAuto : Form
|
||||
{
|
||||
AGVControl.MapControl mapctl;
|
||||
|
||||
public fAuto()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -26,12 +27,12 @@ namespace Project.ViewForm
|
||||
this.ctlAuto1.Scean = CtlAuto.eScean.Progress;
|
||||
else
|
||||
this.ctlAuto1.Scean = CtlAuto.eScean.Normal;
|
||||
this.mapctl = new AGVControl.MapControl();
|
||||
this.mapctl.Dock = DockStyle.Fill;
|
||||
this.mapctl.Visible = true;
|
||||
this.mapctl.Font = this.panel1.Font;
|
||||
this.mapctl.BackColor = Color.FromArgb(32, 32, 32);
|
||||
this.panel1.Controls.Add(mapctl);
|
||||
PUB.mapctl = new AGVControl.MapControl();
|
||||
PUB.mapctl.Dock = DockStyle.Fill;
|
||||
PUB.mapctl.Visible = true;
|
||||
PUB.mapctl.Font = this.panel1.Font;
|
||||
PUB.mapctl.BackColor = Color.FromArgb(32, 32, 32);
|
||||
this.panel1.Controls.Add(PUB.mapctl);
|
||||
}
|
||||
private void fAuto_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -41,7 +42,8 @@ namespace Project.ViewForm
|
||||
ctlAuto1.dev_xbe = PUB.XBE;
|
||||
this.timer1.Start();
|
||||
PUB.AGV.DataReceive += AGV_DataReceive;
|
||||
|
||||
|
||||
|
||||
//auto load
|
||||
var path = new System.IO.DirectoryInfo("route");
|
||||
if (path.Exists == false) path.Create();
|
||||
@@ -61,7 +63,8 @@ namespace Project.ViewForm
|
||||
if (fi.Exists)
|
||||
{
|
||||
PUB.log.Add($"autoload : {fi.FullName}");
|
||||
this.mapctl.LoadFromFile(fi.FullName);
|
||||
var errmsg = PUB.mapctl.LoadFromFile(fi.FullName);
|
||||
if (errmsg.isEmpty() == false) AR.UTIL.MsgE(errmsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +75,8 @@ namespace Project.ViewForm
|
||||
{
|
||||
case arDev.Narumi.DataType.TAG:
|
||||
var tagno = PUB.AGV.data.TagNo;
|
||||
this.mapctl.AGVMoveToRFID(tagno.ToString());
|
||||
PUB.log.Add($"[auto] recv tag : {tagno}");
|
||||
PUB.mapctl.SetCurrentPosition(tagno);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,12 +69,12 @@ namespace Project.ViewForm
|
||||
//후진
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
UTIL.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM])
|
||||
{
|
||||
Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
UTIL.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
if (PUB.CheckManualChargeMode() == false) return;
|
||||
@@ -92,12 +92,12 @@ namespace Project.ViewForm
|
||||
//전진
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
UTIL.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM])
|
||||
{
|
||||
Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
UTIL.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
if (PUB.CheckManualChargeMode() == false) return;
|
||||
@@ -115,12 +115,12 @@ namespace Project.ViewForm
|
||||
//우회전
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
UTIL.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM])
|
||||
{
|
||||
Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
UTIL.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
if (PUB.CheckManualChargeMode() == false) return;
|
||||
@@ -138,12 +138,12 @@ namespace Project.ViewForm
|
||||
//좌회전
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
UTIL.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM])
|
||||
{
|
||||
Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
UTIL.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
if (PUB.CheckManualChargeMode() == false) return;
|
||||
@@ -160,19 +160,19 @@ namespace Project.ViewForm
|
||||
{
|
||||
if (VAR.BOOL[eVarBool.FLAG_CHARGEONA])
|
||||
{
|
||||
Util.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
UTIL.MsgE("자동 충전 중입니다\n충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
else if (VAR.BOOL[eVarBool.FLAG_CHARGEONM])
|
||||
{
|
||||
Util.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
UTIL.MsgE("수동 충전 중입니다\b충전을 해제 하세요");
|
||||
return;
|
||||
}
|
||||
if (PUB.CheckManualChargeMode() == false) return;
|
||||
PUB.sm.SetNewStep(StateMachine.eSMStep.IDLE);
|
||||
if (PUB.AGV.system1.agv_run == false && PUB.AGV.system1.agv_run_manual == false)
|
||||
{
|
||||
var dlg = Util.MsgQ("자동 진행을 시작할까요?\n우측 옵션을 확인 하세요");
|
||||
var dlg = UTIL.MsgQ("자동 진행을 시작할까요?\n우측 옵션을 확인 하세요");
|
||||
if (dlg != DialogResult.Yes) return;
|
||||
var opt = makeopt();
|
||||
PUB.AGV.AGVMoveSet(opt);
|
||||
@@ -301,7 +301,7 @@ namespace Project.ViewForm
|
||||
|
||||
private void btchargeOff_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Util.MsgQ("충전 해제 명령을 전송 할까요?") == DialogResult.Yes)
|
||||
if (UTIL.MsgQ("충전 해제 명령을 전송 할까요?") == DialogResult.Yes)
|
||||
PUB.AGV.AGVCharge(PUB.setting.ChargerID, false);
|
||||
}
|
||||
|
||||
@@ -309,10 +309,10 @@ namespace Project.ViewForm
|
||||
{
|
||||
if (PUB.AGV.signal.mark_sensor == false)
|
||||
{
|
||||
Util.MsgE("마크센서가 확인되지 않아 충전을 시작할 수 없습니다");
|
||||
UTIL.MsgE("마크센서가 확인되지 않아 충전을 시작할 수 없습니다");
|
||||
return;
|
||||
}
|
||||
var dlg = Util.MsgQ("충전 시작 명령을 전송 할까요?");
|
||||
var dlg = UTIL.MsgQ("충전 시작 명령을 전송 할까요?");
|
||||
if (dlg != DialogResult.Yes) return;
|
||||
PUB.AGV.AGVCharge(PUB.setting.ChargerID, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user