Explorar o código

fix mirror issue for mini

Tuan Nguyen hai 11 meses
pai
achega
c9bb7d7a0b
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      dune_weaver_flask/modules/core/pattern_manager.py

+ 3 - 0
dune_weaver_flask/modules/core/pattern_manager.py

@@ -146,6 +146,9 @@ def move_polar(theta, rho):
     x_increment = delta_theta * 100 / (2 * pi * x_scaling_factor)  # Added -1 to reverse direction
     x_increment = delta_theta * 100 / (2 * pi * x_scaling_factor)  # Added -1 to reverse direction
     y_increment = delta_rho * 100 / y_scaling_factor
     y_increment = delta_rho * 100 / y_scaling_factor
     
     
+    if state.gear_ratio == 6.25:
+        x_increment = - x_increment
+    
     x_total_steps = state.x_steps_per_mm * (100/x_scaling_factor)
     x_total_steps = state.x_steps_per_mm * (100/x_scaling_factor)
     y_total_steps = state.y_steps_per_mm * (100/y_scaling_factor)
     y_total_steps = state.y_steps_per_mm * (100/y_scaling_factor)