I have a read a couple of posts and I didn’t seem to find a hard answer. Should we put Teleop Code into our auto vi or not? And if we should, do we have to make any modifications and can I find any documentation for it?
Calling Teleop from within Autonomous Independent.vi is probably the simplest approach if you just want to drive during the Sandstorm.
The call to Teleop needs to at least be in a 20ms loop, although you could get fancier and trigger on the DS packets arriving, too.
Autonomous Independent will be automatically killed when the Sandstorm (autonomous) period ends, so a specific ending condition isn’t necessary. Even if you added a termination check it wouldn’t really be given time to execute.
You can test using Practice on the Driver Station.
Here’s a sample:
You may have already found this, but just in case:
Bandwidth - Bandwidth limit has been reduced to 4 Mbps. Like airline and hotel booking, the 7 Mbps limit included some assumptions that not all teams would use it. With the Sandstorm driving expected camera usage, we have lowered the limit in attempt to limit the likelihood teams will need to reduce below the limit at an event. Sandstorm Coding Mode - Despite the Sandstorm not truly being an "Autonomous" mode, all code (DS, robot code, etc.) will continue to refer to this period as "Autonomous" or "Auto" for continuity. Mode Transitions - The field will transition through modes in the same way as prior seasons. Prior to the start of the match, robot's will be in Disabled Mode. Once the match starts, they will transition to Autonomous Enabled mode. At the end of the Sandstorm, robots will briefly transition through Disabled (~.5s), if team's are driving their robot with joysticks/gamepads at this time, there will be a noticeable hitch. Finally the robot will transition to Teleop Enabled mode for the remainder of the match until the buzzer sounds. When the match expires, the robot will return to Disabled mode. Joystick Access - For this season only, joystick data will not be cached on the transition to Autonomous. Teams will be able to access updated joystick data throughout the Autonomous/Sandstorm period. Game Data - There is no game data for the 2019 season.
Answering generically, as I’m not accomplished at LV code:
If you don’t have any autonomous functions, then yes, your auto code could just call your teleop code, or to be even cleaner, both your auto and teleop code should very cleanly and simply call the SAME code.
Isn’t this what robotPeriodic is for? You can place code in there that runs after the Auto and Telop loops. If nothing is in Auto or Telop then only the robotPeriodic code will run.
Of course I no zero about Labview so I am not sure how that works.
Ok that is what I was wondring. Thanks for the help.