Closed gregmarra closed 6 years ago
Rather than using the robot's current state, allow looking up the position for any state, and have callers of this method pass in the desired state as an argument.
This would allow calls like:
m_elevator.getPositionForState(m_elevator.getNextStateUp())
Right now you're trying to do something similar on https://github.com/GwhsRobotics3/Team-5507-2018/blob/master/src/org/usfirst/frc/team5507/robot/commands/SmartElevatorUp.java#L24 , but you need to call these methods on an object, you can't call them as loose functions like you are right now.
Rather than using the robot's current state, allow looking up the position for any state, and have callers of this method pass in the desired state as an argument.
This would allow calls like:
Right now you're trying to do something similar on https://github.com/GwhsRobotics3/Team-5507-2018/blob/master/src/org/usfirst/frc/team5507/robot/commands/SmartElevatorUp.java#L24 , but you need to call these methods on an object, you can't call them as loose functions like you are right now.