Skip to content
Snippets Groups Projects
Commit 6237c709 authored by Paul-Winpenny's avatar Paul-Winpenny
Browse files

Tag position now displayed.

parent 2cc99cf6
No related branches found
No related tags found
No related merge requests found
...@@ -52,9 +52,7 @@ class AnchorTagGUI: ...@@ -52,9 +52,7 @@ class AnchorTagGUI:
def determine_anchor_coords(self): def determine_anchor_coords(self):
try: try:
measured_distances = self.measured_distances measured_distances = self.measured_distances
for var in measured_distances:
print(var.get())
# Measured distances arrive in order: A, E, D, B, F, C # Measured distances arrive in order: A, E, D, B, F, C
measured_distances = [var.get() for var in measured_distances] measured_distances = [var.get() for var in measured_distances]
...@@ -161,6 +159,7 @@ class AnchorTagGUI: ...@@ -161,6 +159,7 @@ class AnchorTagGUI:
# Display result # Display result
self.output_label.config(text=f"Tag Position: ({x_tag:.2f}, {y_tag:.2f})") self.output_label.config(text=f"Tag Position: ({x_tag:.2f}, {y_tag:.2f})")
#print(f"Tag Position: ({x_tag:.2f}, {y_tag:.2f})")
except Exception as e: except Exception as e:
self.output_label.config(text=f"Error: {str(e)}") self.output_label.config(text=f"Error: {str(e)}")
...@@ -206,8 +205,9 @@ class AnchorTagGUI: ...@@ -206,8 +205,9 @@ class AnchorTagGUI:
self.canvas.create_oval( self.canvas.create_oval(
x_tag_scaled - 5, y_tag_scaled - 5, x_tag_scaled + 5, y_tag_scaled + 5, fill="red" x_tag_scaled - 5, y_tag_scaled - 5, x_tag_scaled + 5, y_tag_scaled + 5, fill="red"
) )
label = f"Tag ({round(x_tag, 2)}, {round(y_tag, 2)})"
self.canvas.create_text( self.canvas.create_text(
x_tag_scaled + 15, y_tag_scaled, text="Tag", fill="black" x_tag_scaled + 15, y_tag_scaled+15, text=label, fill="black"
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment