Selaa lähdekoodia

increase coordinate accuracy

Tuan Nguyen 1 vuosi sitten
vanhempi
sitoutus
53349812da
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app.py

+ 1 - 1
app.py

@@ -86,7 +86,7 @@ def parse_theta_rho_file(file_path, apply_transformations=False):
 def send_coordinate_batch(ser, coordinates):
     """Send a batch of theta-rho pairs to the Arduino."""
     # print("Sending batch:", coordinates)
-    batch_str = ";".join(f"{theta:.3f},{rho:.3f}" for theta, rho in coordinates) + ";\n"
+    batch_str = ";".join(f"{theta:.5f},{rho:.5f}" for theta, rho in coordinates) + ";\n"
     ser.write(batch_str.encode())
 
 def send_command(command):