View Single Post
  #4   Spotlight this post!  
Unread 30-03-2015, 16:22
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,654
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: PID & One Second Delay Between Auto and TeleOp

Quote:
Originally Posted by WillNess View Post
Except during teleopInit() I think I'd have to set the teleopAfterAutonomous = false. Because if I do the practice mode and then I start teleop the teleopAfterAutonomous would be true and then would go to the docked positions so it would look like this: (Correct me if I'm wrong)
Code:
teleopInit(){
   if(teleopAfterAutonomous || DriverStation.getInstance().isFMSAttached()){
      shoulder.set(shoulderDocked);
      elbow.set(elbowDocked);
      teleopAfterAutonomous = false;
   }
}
Only if there's somewhere later in the code (e.g. in teleopPeriodic()) that uses teleopAfterAutonomous. As for what I see here, the variable is not going to be referenced again. That also means that it won't hurt anything...
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote