This commit is contained in:
backuppc
2025-07-14 16:32:56 +09:00
parent fb8c488890
commit 4a45ae15d6
20 changed files with 663 additions and 153 deletions

View File

@@ -712,13 +712,13 @@ namespace AGVControl
/// </summary>
/// <param name="rfidTagNo">RFID TagNo</param>
/// <returns></returns>
public bool SetCurrentPosition(UInt16 rfidTagNo)
public bool SetCurrentPosition(ushort rfidTagNo)
{
var rfidPoint = Manager.FindRFIDPoint(rfidTagNo);
if (rfidPoint != null)
{
// 이동 경로에 추가 (위치 업데이트보다 먼저)
Manager.agv.AddToMovementHistory(rfidTagNo, rfidPoint.Location, Manager.agv.CurrentMOTDirection);
Manager.agv.AddToMovementHistory(rfidTagNo, rfidPoint.Location, Manager.agv.Current_Motor_Direction);
// AGV 위치 업데이트
Manager.agv.CurrentRFID = rfidPoint;
@@ -1053,7 +1053,7 @@ namespace AGVControl
// 고정방향이 있으면 테두리 색상 표시
if (rfid.FixedDirection.HasValue)
{
Color borderColor = rfid.FixedDirection.Value == Direction.Forward ? Color.DeepSkyBlue : Color.Gold;
Color borderColor = rfid.FixedDirection.Value == AgvDir.Forward ? Color.DeepSkyBlue : Color.Gold;
using (var pen = new Pen(borderColor, 2))
{
g.DrawEllipse(pen, rfid.Bounds.Expand(5, 5));
@@ -1098,7 +1098,7 @@ namespace AGVControl
RFIDPoint TargetPT = null;
//뒤로이동하는경우라면 이전위치에 리프트가 있다.
if (lstpt.Direction == Direction.Backward)
if (lstpt.Direction == AgvDir.Backward)
{
TargetPT = prept;
}
@@ -1134,7 +1134,7 @@ namespace AGVControl
g.DrawEllipse(circlePen, circleRect);
//motor direction
var str = Manager.agv.CurrentMOTDirection.ToString().Substring(0, 1);
var str = Manager.agv.Current_Motor_Direction.ToString().Substring(0, 1);
var strsize = g.MeasureString(str, this.Font);
g.DrawString(str, this.Font, Brushes.White, circleRect, new StringFormat
{
@@ -1430,7 +1430,7 @@ namespace AGVControl
if (connection.MoveDirectionP != null)
{
// if (DriveMethod.isEmpty() == false) DriveMethod += "|";
DriveMethod += ((AgvRunDirection)connection.MoveDirectionP).ToString()[0];
DriveMethod += ((AgvSts)connection.MoveDirectionP).ToString()[0];
}
else DriveMethod += nulChar;
if (connection.MoveSpeedP != null)
@@ -1442,7 +1442,7 @@ namespace AGVControl
if (connection.LiftDirectionP != null)
{
//if (DriveMethod.isEmpty() == false) DriveMethod += "|";
DriveMethod += ((AgvRunDirection)connection.LiftDirectionP).ToString()[0];
DriveMethod += ((AgvSts)connection.LiftDirectionP).ToString()[0];
}
else DriveMethod += nulChar;
@@ -1482,7 +1482,7 @@ namespace AGVControl
if (connection.MoveDirectionN != null)
{
//if (DriveMethod.isEmpty() == false) DriveMethod += "|";
DriveMethod += ((AgvRunDirection)connection.MoveDirectionN).ToString()[0];
DriveMethod += ((AgvSts)connection.MoveDirectionN).ToString()[0];
}
else DriveMethod += nulChar;
if (connection.MoveSpeedN != null)
@@ -1494,7 +1494,7 @@ namespace AGVControl
if (connection.LiftDirectionN != null)
{
//if (DriveMethod.isEmpty() == false) DriveMethod += "|";
DriveMethod += ((AgvRunDirection)connection.LiftDirectionN).ToString()[0];
DriveMethod += ((AgvSts)connection.LiftDirectionN).ToString()[0];
}
else DriveMethod += nulChar;
@@ -1779,7 +1779,7 @@ namespace AGVControl
rfidPoint.IsRotatable = isRotatable;
}
if (rfidParts.Length >= 5 && !string.IsNullOrEmpty(rfidParts[4]))
rfidPoint.FixedDirection = (Direction)Enum.Parse(typeof(Direction), rfidParts[4]);
rfidPoint.FixedDirection = (AgvDir)Enum.Parse(typeof(AgvDir), rfidParts[4]);
if (rfidParts.Length >= 6)
{
bool isTerminal;