Skip to content

Instantly share code, notes, and snippets.

@ethan-gallant
Created November 27, 2022 19:42
Show Gist options
  • Save ethan-gallant/ca824742b04175b2ab9644b0efe20287 to your computer and use it in GitHub Desktop.
Save ethan-gallant/ca824742b04175b2ab9644b0efe20287 to your computer and use it in GitHub Desktop.
sub offset_drive
call math.muldiv(left_mod, left_target, 1000, 1000 + DRIVE_OFFSET)
call math.muldiv(right_mod, right_target, 1000, 1000 - DRIVE_OFFSET)
motor.right.target = right_mod
motor.left.target = left_mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment