Go to Post I think there is much to be learned from working in teams, and team projects, but even more when you go out on your own some time for something you are truly passionate about. - paul_v [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 24-01-2005, 15:48
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
_mode flag summary??

I searched, but I did not find...

Can someone definitively describe the various "_mode" flags in the code, such as autonomous_mode and competition_mode (now called disabled_mode this year, to better reflect the polarity of the bit!) and any similar flags? See below:
Code:
/*
 *-----------------------------------------------------------------------------------------------------
 *---------- Aliases for User Modes  ------------------------------------------------------------------
 *-----------------------------------------------------------------------------------------------------
 * These bits tell you what mode your robot is currently in.
 *     1 = in <X> mode; 0 = not in <X> mode
 */

#define user_display_mode   rxdata.rc_mode_byte.mode.user_display
#define autonomous_mode     rxdata.rc_mode_byte.mode.autonomous
#define disabled_mode       rxdata.rc_mode_byte.mode.disabled

I am particularly interested in how they are controlled by the Match Computer. I have a dongle, but that doesn't tell me under what circumstances which flag is in what state.

This year is especially interesting. For example:

1. What happens when the human player steps off the switch pad? Do any flags indicate this?

2. How do I make a timer that measures match time, including the time the human player is off the pad? Last year I simply had a counter in Default_Code(), but that ran all the time, even before the match started.

3. There is a dead time between autonomous and manual mode during each match for the officials to award tetras, etc. How can my software know when that is the state?

4. How can I code a "software reset", so that all the "time counters" can be reset without having to press the "reset" button on the RC? This is especially important for the second run of practice matches.



If someone could describe an example match and how it is reflected in the _mode bits, that would be really helpful.


Thanks all!
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exec. summary question lilszek24 Chairman's Award 2 22-01-2005 12:15
[OCCRA]: Rules Question: Can the flag move the arrow? wbhsAndy OCCRA Q&A 1 27-10-2004 11:01
Regarding Executive Summary Form Petey Chairman's Award 3 22-02-2004 16:49
Yet another time limit question (about exec summary) Caroline Chairman's Award 1 06-02-2002 17:14
Competition Detail Summary kmcclary Off-Season Events 3 15-11-2001 11:30


All times are GMT -5. The time now is 05:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi