Closed chlohal closed 2 years ago
We don't know where the weirdness came from.
I have a suspicion that it's from DcMotors being plugged in backwards, which inverts their directions, but I'm not sure
Robot still Works; need to test by switching motor around!!!
Current State:
We have a hard-coded
-1 *
on line 40 ofPIDlessEncoderMovementThread.java
to account for weirdness in the directions. We don't know where the weirdness came from.Ideal:
The
PIDlessEncoderMovementThread
should be able to adapt to any direction. We can see the motor ticks accurately, so why don't we:-1
With the x-axis being time, here's an an explanation of how it might work. In the purple region, we're giving a positive change, but getting a negative output.![diagram of explanation](https://user-images.githubusercontent.com/26300854/150643031-d5b14e88-448d-42d0-bc45-1f3b050c415f.png)
Ideally, this will make it super easy in the future: the motors can run whichever way they want, and as long as they report accurate ticks,
PIDlessEncoderMovementThread
will just adapt to them!Why Not Just Have The -1?
It works now, but if someone plugs in a motor incorrectly, we have to hunt down the issue and fix it again. That's wasted time that we could spend on something else!