Changed structure
This commit is contained in:
8
solar.py
8
solar.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user