Formatting
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
"""
|
||||
When theta motor is at 0 then mirror is up and when at 180 then mirror is front.
|
||||
Phi 0 equals right and phi 180 equals left by 45 degrees.
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
|
||||
from objects.generic import Source, Target
|
||||
@@ -5,9 +10,10 @@ from objects.motor import Motor
|
||||
|
||||
from calculator import get_angles
|
||||
|
||||
|
||||
class Mirror:
|
||||
def __init__(self, world, cluster_x=0, cluster_y=0):
|
||||
self.world = world
|
||||
self.world = world # TODO: Fix this cyclic reference
|
||||
self.cluster_x = cluster_x
|
||||
self.cluster_y = cluster_y
|
||||
|
||||
@@ -32,7 +38,7 @@ class Mirror:
|
||||
rel_source = source.pos - rot_pos
|
||||
rel_target = target.pos - rot_pos
|
||||
|
||||
phi, theta = get_angles(rel_source, rel_target) # ty:ignore[unresolved-reference]
|
||||
phi, theta = get_angles(rel_source, rel_target)
|
||||
|
||||
# Update the angles based on the normals in rotated positions
|
||||
self.motor_phi.set_angle(phi)
|
||||
|
||||
Reference in New Issue
Block a user