Quote:
Originally Posted by mikets
We don't do command based programming and also not knowing what each subsystem is supposed to do, I just looked through the code and found a couple of minor optimizations on boolean expressions.
Code:
...
if(button10left.get() && !button10LeftLast) {
button10LeftLast = true;
compDisable = !compDisable;
}
...
Intake.isFinished()
{
return !RobotMap.intakeOutSwitch.get();
}
|
Thank you! I'll get those fixed up ASAP.
Quote:
Originally Posted by Lireal
The major issue I see with your code is that you are using the sybsystems and RobotMap completely wrong. Your RobotMap should only include really include numbers. All of your motor controllers, sensors, etc. should be a in your subsystems. Read through these examples and you will see how to do it: https://wpilib.screenstepslive.com/s.../13809/c/88893
|
Oh gosh, I didn't know I was doing it wrong this whole time. I'll definitely beg our team to get a new control system so I'll be able to practice with doing it the right way. Thanks!
If anyone else sees something wrong with my code, please let me know.

I'm making a bit of a list of stuff I need to practice.
__________________
FRC Team 3680 - Head Programmer (2014-), President (2016-)
2014 - North Carolina Regional Creativity Award
2016 - North Carolina District Qualification (UNC Asheville Event) Winner, Judge's Award