This commit is contained in:
backuppc
2026-01-06 17:35:34 +09:00
parent 649d87cae3
commit 90340f4a7d
39 changed files with 2127 additions and 685 deletions

View File

@@ -351,8 +351,8 @@ namespace AGVEmulator
private void AgvViewer1_TagTouched(object sender, UC.AgvViewer.TagArgs e)
{
logAGV.Add($"tag touch:{e.Data}");
numericUpDown1.Text = e.Data;// decimal.Parse(e.Data);
button18.PerformClick();
//numericUpDown1.Text = e.Data;// decimal.Parse(e.Data);
//button18.PerformClick();
UpdateVisualAgvPosition(e.Data);
}
@@ -559,7 +559,7 @@ namespace AGVEmulator
private void UpdateVisualAGV()
private void UpdateVisualAGV()
{
if (_visualAgv != null)
{
@@ -619,18 +619,18 @@ private void UpdateVisualAGV()
// Send Tag
if (node.Id != numericUpDown1.Text)
{
if (int.TryParse(node.Id, out int tag))
{
AGV.SendTag(node.Id);
numericUpDown1.Text = node.Id;
if (int.TryParse(node.Id, out int tag))
{
//AGV.SendTag(node.Id);
numericUpDown1.Text = node.Id;
// Snap to node
_currentPosF = node.Position;
_visualAgv.CurrentPosition = node.Position;
// Snap to node
_currentPosF = node.Position;
_visualAgv.CurrentPosition = node.Position;
// Decide Next Move (Turn/Straight)
DecideNextMove(node);
}
// Decide Next Move (Turn/Straight)
DecideNextMove(node);
}
}
}
}
@@ -793,7 +793,7 @@ private void UpdateVisualAGV()
private void toolStripButton3_Click(object sender, EventArgs e)
{
var file = @"C:\Data\Amkor\AGV4\route\NewMap.agvmap";
if(System.IO.File.Exists(file)==false)
if (System.IO.File.Exists(file) == false)
{
var od = new OpenFileDialog();
od.Filter = "json|*.json";
@@ -916,6 +916,19 @@ private void UpdateVisualAGV()
}
}
}
private void button2_Click(object sender, EventArgs e)
{
var target = (byte)nudIDAgv.Value;
this.XBE.SendPickOn(target);
}
private void button3_Click(object sender, EventArgs e)
{
var target = (byte)nudIDAgv.Value;
this.XBE.SendPickOff(target);
}
private void trbT2_Scroll(object sender, EventArgs e)
{
Temp2 = (UInt16)trbT2.Value;