Changed structure

This commit is contained in:
Dlr Rpi
2025-11-06 16:20:44 +01:00
parent 7bd18d09ac
commit aeeb78bf98
5 changed files with 31 additions and 145 deletions

View File

@@ -31,8 +31,8 @@ class Mirror:
self.cluster_y = cluster_y
# Store the motors
self.yaw = motor.Motor(self.world.pi, yaw_pin)
self.pitch = motor.Motor(self.world.pi, pitch_pin)
self.yaw = motor.Motor(self.world.board)
self.pitch = motor.Motor(self.world.board)
# Position in un-tilted coordinate system
self.pos = (cluster_x * self.world.grid_size, cluster_y * self.world.grid_size, 0.0)
@@ -81,8 +81,8 @@ class Mirror:
return self.yaw.angle, self.pitch.angle
class World:
def __init__(self, pi, tilt_deg=0.0):
self.pi = pi
def __init__(self, board, tilt_deg=0.0):
self.board = board
self.grid_size = 10 # In cm
self.tilt_deg = tilt_deg # Tilt of the grid system around y-axis