View Single Post
  #5   Spotlight this post!  
Unread 06-02-2010, 21:14
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: TeleOp Init/Stop vs. Auton-Iterative Init/Stop

OK ... really good stuff here. Thanks. I'll update my flows here instead of editing my OP.

When I referred to the "FINISH" state originally, I was referring to every option of the ENUM that defines the Robot Mode, not necessarily the Finish.VI that gets called when you press the button on the RobotMain.vi's front panel.

I took a second look at the default robot project. I had assumed that that ENUM/CaseStructure's possible entries were 1-to-1 with what the FieldManagementSystem (FMS) can send us. But apparently the FINISH state of that ENUM/CaseStructure is only written as the RobotMode when you press that front-panel button. And I agree. It doesn't matter, since the first step of leaving the field is to power down anyway.

... so here are my new assumptions ...


The Robot Mode has 6 states. 4 are controlled by the FMS. They'll normally flow in this order when we're on the playing field:

Autonomous Disabled
Autonomous Enabled - (VisitedAutonomous goes TRUE)
Autonomous Disabled
Teleop Disabled
Teleop Enabled - (VisitedTeleOp goes TRUE)
Teleop Disabled
The 5th state is FINISH and only happens when you have the front-panel's open and can press the FINISH button.

The 6th state is Timeout and it's the exception when we don't get a DS packet.

Now, inside both the Auton and Teleop structures, we have the Derived Robot State of

Init Called when transitioning from Disabled to Enabled.
Execute We spend most of our time in here
Stop Called when leaving Enabled


I learned a few things today. Thanks guys.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote