Advertisement
Guest User

Untitled

a guest
Mar 25th, 2014
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. //determin direction
  2. if (current_station < tool_number) {
  3. //go forward
  4. fwd_hops = tool_number - current_station;
  5. rev_hops = stations - fwd_hops;
  6. //st_inc = command_inc * fwd_hops;
  7. } else {
  8. //go backwards
  9. rev_hops = current_station - tool_number;
  10. fwd_hops = stations - rev_hops;
  11. //st_inc = command_inc * rev_hops;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement