View Single Post
  #4   Spotlight this post!  
Unread 05-03-2009, 08:28
rrossbach rrossbach is offline
Registered User
AKA: Ron R
FRC #2607 (RoboVikings)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Warrington PA
Posts: 90
rrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to beholdrrossbach is a splendid one to behold
Re: Intresting Autonomous

Quote:
Originally Posted by Vikesrock View Post
Quote:
Originally Posted by Hazmatt View Post
Ideally we would have had a "field position switch" which would allow us 3 different autonomous modes, but unfortunately a firmware update disabled this ability for us. Also unfortunate was that we already had the control panel made with the switch mounted.

I wrote a ton, but I hope that lets you in on the "secret"
Switches on the DS side can still be read and used to select Autonomous modes. The difference is that they now cannot be read in Autonomous/Enabled mode. Read them in Autonomous/Disabled and cache the values for use during Autonomous/Enabled. Also, there are reports that the values return incorrectly from the last cycle of Autonomous Disables, so make sure your code has a way of dealing with this.
Our team did some experimenting and found that at least in LabView, the last time Auto Disabled runs the DS input values are in fact zeroed out just like they are if you try to read them during Auto Enabled. I assume the C++ handling is similar but we have not checked that.

It's hard to handle this in the LabView Basic Framework, but is pretty straightforward in the Advanced Framework - attached is an example Disabled.vi for the advanced framework that shows this, hope it's useful! The AutonMode.vi also attached is just a simple "functional global" variable. Autonomous Independent just reads the cached value.

Ron
Team 2607 - software mentor
Attached Files
File Type: vi Disabled.vi (70.5 KB, 25 views)
File Type: vi AutonMode.vi (8.5 KB, 20 views)
File Type: vi Autonomous Independent.vi (18.5 KB, 31 views)
Reply With Quote