Skip to content

Commit 594349d

Browse files
committed
Fill combined field layout with tags from the ideal layout and add note about ideal layout being used
1 parent f66654b commit 594349d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wpical/src/main/native/cpp/WPIcal.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,8 @@ void CombineCalibrations() {
395395
auto text = fmt::format("Tag ID {}: {}", tagId, filePath);
396396
ImGui::TextUnformatted(text.c_str());
397397
} else {
398-
ImGui::Text("Tag ID %i: <none (DROP HERE)>", tagId);
398+
ImGui::Text("Tag ID %i: <none, using ideal field layout (DROP HERE)>",
399+
tagId);
399400
}
400401
if (ImGui::BeginDragDropTarget()) {
401402
if (const ImGuiPayload* payload =
@@ -444,6 +445,9 @@ void CombineCalibrations() {
444445
frc::AprilTag tag{tagId, tagPose.value()};
445446
tags.emplace_back(tag);
446447
}
448+
} else {
449+
frc::AprilTag tag{tagId, gIdealFieldLayout.GetTagPose(tagId).value()};
450+
tags.emplace_back(tag);
447451
}
448452
}
449453
saveDirSelector =

0 commit comments

Comments
 (0)