purduesigbots / pros

Source code for PROS kernel: open source C/C++ development for the VEX V5 microcontroller
https://pros.cs.purdue.edu
Other
259 stars 76 forks source link

:bug: PROS 4: Fix Motor Behavior for move_absolute and move_relative #545

Closed noam987 closed 1 year ago

noam987 commented 1 year ago

Summary:

Fixes behavior of move absolute and move relative for motors New behavior: motor_move_absolute does not care about sign of the port as it is absolute movement. motor_move_relative with a negative port value should move in the reversed direction if the distance is positive. PROS 3 behavior is still functional if you use the c api motor_set_reversed and only positive port numbers

Motivation:

Current code does not behave as expected

Test Plan:

Test 1:

noam987 commented 1 year ago

Hardware tested. It works

noam987 commented 1 year ago

image