Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
rombie18 committed May 3, 2023
1 parent ab77059 commit 5273b99
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Software/threads/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def __cycle_loop_motor(self):
self.actuator_motor.throttle = self.motor_pid(self.velocity)

def __cycle_loop_steering(self):
self.actuator_servo.angle = self.transform_centerangle_to_angle(self.servo_pid(
self.transform_angle_to_centerangle(self.transform_heading_to_angle(self.heading))))
self.actuator_servo.angle = self.pipe_imageprocessing["angle"]
#self.actuator_servo.angle = self.transform_centerangle_to_angle(self.servo_pid(self.transform_angle_to_centerangle(self.transform_heading_to_angle(self.heading))))

### Calculations ###
def process_calculations(self):
Expand Down Expand Up @@ -212,12 +212,15 @@ def controller_process(self, key):
if key.keytype == "Button" and key.number == 2 and key.raw_value == 1:
# Red circle button
# Safe stop
self.stop = True
self.safe_stop()

if key.keytype == "Button" and key.number == 3 and key.raw_value == 1:
# Green triangle button
# Start
self.start = not self.start
if self.pause_event.is_set():
self.pause_event.clear()
else:
self.pause_event.set()

if key.keytype == "Hat" and key.number == 0 and key.raw_value == 1:
# Left hat up
Expand Down

0 comments on commit 5273b99

Please sign in to comment.