View Single Post
  #7   Spotlight this post!  
Unread 22-03-2013, 21:23
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: Automatic 2 Speed Drivetrain Shifting Code

Quote:
Originally Posted by apples000 View Post
This can be detected if the actual speed of the robot is >10% away from where the joysticks are and if the average deceleration over the last second or so exceeds a certain amount.
I've not used Encoder.getRate() much. What kind of units would it return? (assuming default setup with the gear box and whatnot) How would I compare it to the joystick speed (-1 to +1)?

Also, is it bad to shift up if it is turning, but going forwards as well? (ie. +0.7 speed, -0.4 turn)
__________________
All opinions are my own.