Skip to content

Commit

Permalink
update VEX-IQ Armbot-IQ programs
Browse files Browse the repository at this point in the history
  • Loading branch information
LuongTheVinh committed Sep 19, 2021
1 parent f035b30 commit f000c33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ def keep_controlling_shoulder_by_controller_axis_d():
def control_elbow_by_controller_axis_a():
controller_axis_a_position = CONTROLLER.axisA.position()

if controller_axis_a_position:
if ((controller_axis_a_position > 0) and
(not ELBOW_BUMPER_SWITCH.pressing())) or \
(controller_axis_a_position < 0):
ELBOW_MOTOR.spin(
DirectionType.FWD, # dir
controller_axis_a_position, # velocity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ def keep_controlling_shoulder_by_controller_axis_d(self):
def control_elbow_by_controller_axis_a(self):
controller_axis_a_position = self.controller.axisA.position()

if controller_axis_a_position:
if ((controller_axis_a_position > 0) and
(not self.elbow_bumper_switch.pressing())) or \
(controller_axis_a_position < 0):
self.elbow_motor.spin(
DirectionType.FWD, # dir
controller_axis_a_position, # velocity
Expand Down

0 comments on commit f000c33

Please sign in to comment.