Before anything is committed and pushed from the robotics computers...
There's a few things we can do to improve the code for the automated lifter.
Combine all the goTo____() functions in the Lifter class into one function. There is also code in here that helps with the lifter being too sensitive. If the old code is about the same as this, use it. Here's some example code that may work for our purposes though. It requires testing, of course.
Move the autoLift switch statement out of Robot.java and into the Lifter class, and put it under a function. We can keep modeAdder in Robot.java. We may have to define a new function to fit the above example. Something along the lines of in Robot.java:
m_lifter.gotoLevel(int ID)
and in Lifter.java:
def gotoLevel(int ID) {
switch ID {
// Put switch statement from auto lift in here.
I thing the relevant levels we need are Hatch: 1, 2, 3 and Cargo: floor, 1, cargoShip, and 2.
And then we can keep the LIDAR stuff in the LifterHeight class.
Before anything is committed and pushed from the robotics computers...
There's a few things we can do to improve the code for the automated lifter.
goTo____()
functions in the Lifter class into one function. There is also code in here that helps with the lifter being too sensitive. If the old code is about the same as this, use it. Here's some example code that may work for our purposes though. It requires testing, of course.Robot.java
and into the Lifter class, and put it under a function. We can keep modeAdder in Robot.java. We may have to define a new function to fit the above example. Something along the lines of inRobot.java
:m_lifter.gotoLevel(int ID)
and inLifter.java
:I thing the relevant levels we need are Hatch: 1, 2, 3 and Cargo: floor, 1, cargoShip, and 2.
And then we can keep the LIDAR stuff in the LifterHeight class.