feat: RFID 값 기반 콘솔 로그 표시 개선
- DirectionChangePlanner에 GetDisplayName 헬퍼 메서드 추가 - RFID 값이 있으면 표시, 없으면 (NodeID) 형태로 표시 - 갈림길 정보 출력 시 사용자 친화적 형식 적용 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -245,7 +245,7 @@ namespace AGVNavigationCore.PathFinding
|
||||
// 실제 방향 전환 노드 찾기 (우회 노드)
|
||||
string actualDirectionChangeNode = FindActualDirectionChangeNode(changePath, junctionNodeId);
|
||||
|
||||
string description = $"갈림길 {junctionNodeId}를 통해 {actualDirectionChangeNode}에서 방향 전환: {currentDirection} → {requiredDirection}";
|
||||
string description = $"갈림길 {GetDisplayName(junctionNodeId)}를 통해 {GetDisplayName(actualDirectionChangeNode)}에서 방향 전환: {currentDirection} → {requiredDirection}";
|
||||
return DirectionChangePlan.CreateSuccess(changePath, actualDirectionChangeNode, description);
|
||||
}
|
||||
|
||||
@@ -514,5 +514,20 @@ namespace AGVNavigationCore.PathFinding
|
||||
var junctions = _junctionAnalyzer.GetJunctionSummary();
|
||||
return string.Join("\n", junctions);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 노드의 표시명 가져오기 (RFID 우선, 없으면 (NodeID) 형태)
|
||||
/// </summary>
|
||||
/// <param name="nodeId">노드 ID</param>
|
||||
/// <returns>표시할 이름</returns>
|
||||
private string GetDisplayName(string nodeId)
|
||||
{
|
||||
var node = _mapNodes.FirstOrDefault(n => n.NodeId == nodeId);
|
||||
if (node != null && !string.IsNullOrEmpty(node.RfidId))
|
||||
{
|
||||
return node.RfidId;
|
||||
}
|
||||
return $"({nodeId})";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user