Quote:
Originally Posted by otherguy
Command base is just the IterativeRobot class using the Command and Scheduler classes.
Look at your code, the main robot class probably has a line like this...
Code:
public class Robot extends IterativeRobot {
Note the "extends IterativeRobot" part.
Same goes for command base as I said before, no loops or thread.sleeps unless you understand the consequences and know it will not affect execution of the rest of the robot code. This is especially true for the code within a command - since the code in a command shares the 20ms execution period with all other active commands.
|
wait so would this be fine:
Quote:
timer = new Timer();
intake_b.set(true);
timer.start();
while(timer.get() < Constants.solenoid_timing.getDouble()){
}
if(timer.get() >= Constants.solenoid_timing.getDouble()){
intake_b.set(false);
}
|
the timing value is 2000ms