|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
competition_mode aka rxdata.rc_mode_byte.mode.disabled
The bit called "disabled" in the mode structure in ifi_default.h, with the comment "/* Competition enabled = 1, disabled = 0 */", and also called competition_mode in ifi_aliases.h, may leave some people wondering what the bit really indicates, as it did me. I got the following clarification from IFI:
Quote:
A use we make of this bit is to know if we're in a "real game" or not. If I ever see this bit set to 1, I set a static variable realgame to 1 forevermore. I then use this realgame bit to disable various test features, since I never want them used during a real game. Anyway, wanted to post this clarification from IFI in case anybody else needed it. I couldn't find the info elsewhere in CD. Bill |
|
#2
|
|||||
|
|||||
|
Re: competition_mode aka rxdata.rc_mode_byte.mode.disabled
...is it just me or does competition_mode = 0 (False) as an indicator that the competition is under way, seem just a bit (ha!) ironic?
...we use it to toggle an "init flag" that we check for pre-game auto-calibrations. Eric Schreffler |
|
#3
|
|||||
|
|||||
|
Re: competition_mode aka rxdata.rc_mode_byte.mode.disabled
The comp_mode bit is rather useful. While it is equal to 1 (disabled) I use the 8 OI Feedback LEDs to calibrate the 2 joysticks (4 axis). Red means the axis is less than or equal to 127 and Green means the axis is greater than or equal to 127. The Operators have to play around with the calibration wheels until they get all 8 LEDs on before they are cleared for take-off. It's quite fun to watch them and be overly critical by saying things like "You just missed center like 10 times in a row!" and "Are you sure you know how to use a joystick?"
They will point out things like "I got them both on, but that one blinks so much I think I am going to have a seizure" I am glad the Master uP handles all of the actual disabling of outputs in this Robot Controller. Teams used to mess with the disable bit check in thier code in previous years, and thier beacon would stay on while disabled. This freaked me out because you could never figured out when they were actually disabled. Although with this RC you may still be able to control PWMs 13-16 (User uP controlled PWMs) which is a scary idea that I am sure no one on my team will let me test out. That is if I tell them about it first, I could just tell them it is a new Autonomous strategy ![]() |
|
#4
|
||||
|
||||
|
Re: competition_mode aka rxdata.rc_mode_byte.mode.disabled
no matter what you do in your code, when the controller is disabled all 16 pwms, and all the relay outs will be off. There is another layer of SW above the code that we see - we only tell it what we want the output to do, that other code actually controls the outputs
Messing with the 'comp_mode' bit wont change that, it never has - they are disabled outside the code that we have access to. If someone had their rotating light on last year when the robot was disabled, they must of had it plugged directly into the fuse box, or had a mistake in their wiring. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The AKA Profile Field. | Brandon Martus | CD Forum Support | 17 | 01-08-2003 18:54 |
| Use of the AKA Profile Field | Brandon Martus | Announcements | 0 | 30-07-2003 22:54 |
| Looking for ways to incorporate Mt. Dew (aka - F.I.R.S.T. Fuel) into food recipes! | Elgin Clock | Chit-Chat | 27 | 28-01-2003 11:09 |
| Wonder Wheels (aka Side Slip Wheels) | Scott358 | Technical Discussion | 4 | 08-01-2002 12:36 |
| 10 Spots left to Nationals aka The Championships? | Hymnson | General Forum | 1 | 01-10-2001 18:48 |