My team is developing a custom Dashboard in LabVIEW, and we’d like to be able to have the robot signal to the Dashboard the instant TeleOp mode begins - we want to have a local timer running that should be very very close to the actual field time to give our drivers an extra visual cue that time is running out.
I’m not sure if I’m overanalyzing the problem, but I don’t think it’s as easy as knowing when the TeleOp routine begins (and hybrid ends). During a game, hybrid mode begins and runs for 15 seconds. Then there’s sometimes a pause between the end of hybrid and the beginning of teleop - last year the referees took this time to remove unplaced keepers from robots. During this pause I think the robots are in TeleOp mode but they aren’t allowed to receive feedback from the driver stations - I just don’t know and this is where I was hoping someone here knew. I would like to be able to have the robot code know the instant the radio communications come online and the robots are able to be controlled remotely.
Is this as simple as knowing when the teleop code begins, or is there something a little more crafty required?
you are correct about the 15 sec hybrid, little pause, then 2 min tele.
You shouldn’t need to do really any thing in the robot code(or at least I wouldn’t think so) If you just have switches or buttons in the comp port(I believe there is a port diagram on ifirobotics), having the auto activated then use the disable one(robot won’t move at all during hybrid or tele) then turn that off along with the hybrid swith/button.
That is what I would do, other might see a better way though
If you look at the code (specificially ifi_frc.c/main()) I released for the 2008 game, I took a cut at simplifying the code. You’ll want to look at the Teleop_Init() function, which does exactly as you describe. If you’re not using my code, you could probably re-structure your code along the same lines.
Thank you, Kevin! We are certainly using your new code for 2008, but I was just unsure as to how the state machine worked. This is the key we were looking for.