Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //determin direction
- if (current_station < tool_number) {
- //go forward
- fwd_hops = tool_number - current_station;
- rev_hops = stations - fwd_hops;
- //st_inc = command_inc * fwd_hops;
- } else {
- //go backwards
- rev_hops = current_station - tool_number;
- fwd_hops = stations - rev_hops;
- //st_inc = command_inc * rev_hops;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement