Closed GwhsRobotics3 closed 6 years ago
One thing to consider doing is setting a relatively low target, and driving back and forth from that target to zero repeatedly.
Does the elevator go to approximately the same position each time? If not, why not?
Sent from my iPhone
On Feb 10, 2018, at 08:18, GwhsRobotics3 notifications@github.com wrote:
While testing the elevator, it went up much higher than we expected. We were testing by entering a certain number of inches but it seems like our math was wrong. But when we double checked our math, everything seemed correct. We tried looking at the number of ticks for each state and changing our code so that we would enter a number of ticks to move instead of inches, but the number of ticks changed every time we reset the position. Is there anything wrong with our code that could affect this?
public static void setDesiredPosition(double inches) { double ticks = 1264 / (Math.PI 1.25) * inches; elevatorPulley.set(ControlMode.MotionMagic, ticks);
} — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
While testing the elevator, it went up much higher than we expected. We were testing by entering a certain number of inches but it seems like our math was wrong. But when we double checked our math, everything seemed correct. We tried looking at the number of ticks for each state and changing our code so that we would enter a number of ticks to move instead of inches, but the number of ticks changed every time we reset the position. Is there anything wrong with our code that could affect this?
public static void setDesiredPosition(double inches) { double ticks = 1264 / (Math.PI 1.25) * inches; elevatorPulley.set(ControlMode.MotionMagic, ticks);