Skip to content

Commit

Permalink
Fix tilt directions
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaman authored and thinkl33t committed Jun 2, 2024
1 parent 7143b2b commit dbfce9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/lib/simple_tildagon.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ def is_tilted_forward():
@staticmethod
def is_tilted_back():
acc_read = tilda_imu.acc_read()
if acc_read[1] > 4:
if acc_read[0] > 4:
return True
return False

@staticmethod
def is_tilted_left():
acc_read = tilda_imu.acc_read()
if acc_read[1] > 4:
if acc_read[1] < -4:
return True
return False

@staticmethod
def is_tilted_right():
acc_read = tilda_imu.acc_read()
if acc_read[0] < -4:
if acc_read[1] > 4:
return True
return False

Expand Down

0 comments on commit dbfce9a

Please sign in to comment.