Skip to content

Commit

Permalink
Fix is / is not
Browse files Browse the repository at this point in the history
  • Loading branch information
0xD0M1M0 authored Dec 29, 2022
1 parent cf086de commit 3698d76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rover.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def joystickToSteeringAngle(self, driving_command, steering_command):
if(self.locomotion_mode == LocomotionMode.ACKERMANN.value):

# No steering if robot is not driving
if(driving_command is 0):
if(driving_command == 0):
return steering_angles

# Radius: Scale between min and max Ackermann radius
Expand Down Expand Up @@ -286,7 +286,7 @@ def joystickToVelocity(self, driving_command, steering_command):
v_inner = int(v*inner_turning_radius/outer_turning_radius)

deg = steering_command
if(driving_command is not 0):
if(driving_command != 0):
# Left turn
if(deg < 85 and deg > -85):
motor_speeds[self.FL] = -v_outer
Expand Down

0 comments on commit 3698d76

Please # to comment.