|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Ok.. this seems like such a stupid question, but its been bugging me and I honestly am not seeing the reason for this.. but maybe its just me.
What is the purpose of comp_mode? Yes, I know what it does.. it is set at the beginning and end of a match.. its function is very clear. But why does it exist? Personally.. I disregard it completely because like I said.. its useless. All it tells me is that the motors and stuff are now active and can be controlled. But, really, why does the program care? If I activate motors or relays or the light before they are enabled, then nothing happens, right? I could have someone moving the joystick around and have the stamp send out signals to the motors.. but if their disabled it doesn't do diddily squat. There's only one purpose I can think of, and that is having some kind of timer so you can determine how long the match has been going.. but I cant really think of a reason software would need to know that.. Anyone have ideas? Cuz I dont get it.. |
|
#2
|
|||||
|
|||||
|
My starting code waits in a loop until the robot is enabled at the beginning, from there it jumps to autonomous banks based on the position of our selection switch on our controls.
Without comp_mode, it would be more difficult, not impossible, but slightly more difficult. |
|
#3
|
||||
|
||||
|
is that so now? hrm.. here's what I have in my "operator-controlled" portion..
if auto_button = 1 OR auton_mode = 1 then get 10, auto_selection select (auto_select) case 0 to 3 'line tracking run 6 case 4 to 7 'dead reckoning run 7 case 8 'joy 1 run 2 case 9 'joy 2 run 3 case 10 'joy 3 run 4 case 11 'joy 4 run 5 case 12 'joy 5 run 2 case 13 'joy 6 run 3 case 14 'joy 7 run 4 case 15 'joy 8 run 5 endselect else gosub operator_control endif Not really so hard.. and it allows me to simulate auto mode by using a joystick button or something.. :-) [edit] Also.. this seems to be more efficient because it promotes a better transition from auto mode to user mode because of user mode is the default.. [/edit] Last edited by randomperson : 19-03-2003 at 22:26. |
|
#4
|
|||
|
|||
|
Dongle Observation
Comp_Mode is the Iffy name for kill. If you make a dongle (the new one), and operate the kill switch, the comp-mode bit is changed.
The significance of the comp_mode bit is not that you can't use it, but that it is the bit that disables your robot in the arena except for a certain 2:00 minute interval. ![]() If you can make use of it, do so. You stilll have to Serin the PBmode byte to tell when the auton_mode bit is alive. Now, about the User_mode bit . . . . |
|
#5
|
|||
|
|||
|
I use it to reset my Auton_MOde timer. That way The robot doesnt have to be reset each time I want to test auto mode. Also RoboEmu doesnt support reseting the robot.
|
|
#6
|
||||||
|
||||||
|
Quote:
Anyways, about comp_mode: the main reason I can think of would be for people who log data and use it to analyze post-match. It's also probably just left over from before the days of autonomous mode, when it was the only way to determine when a match actually started. Finally, I know of some teams that have counters run for the entire match. These people probably don't want to keep incrementing counters, etc after the match ends at the risk of overflowing a word-sized variable, etc. --Rob |
|
#7
|
|||||
|
|||||
|
I also use it in my autonomous program select code. When the robot is disabled, and the OI is in user display mode, I use a joystick button to cycle through the autonomous programs, displaying the program number on the OI for feedback.
|
|
#8
|
||||
|
||||
|
Quote:
![]() |
|
#9
|
|||||
|
|||||
|
Quote:
Code:
get AUTON_PROG_NUM, temp10 out8 = temp10.bit0 out9 = temp10.bit1 out10 = temp10.bit2 out11 = temp10.bit3 out12 = temp10.bit4 out13 = temp10.bit5 out14 = temp10.bit6 out15 = temp10.bit7 Code:
get AUTON_PROG_NUM, OUTH [edit] This will display the value in temp10 on the 3 (or 4) digit display on the operator interface when the OI is in user display mode. You put your OI into user display mode using the same select button with which you tell the OI to display the team number, radio channel, or robot battery voltage. You can recognize that the OI is in user mode when two decimal points appear in the display. When the OI is NOT in user mode, out7 through out15 are displayed by the PWM and relay indicator LEDs on the OI.[/edit] Last edited by Greg Ross : 24-03-2003 at 01:50. |
|
#10
|
|||||
|
|||||
|
Quote:
Our 'bot won't be accessible for another week, but I just tried it in RoboEmu, and I couldn't get it to work unless I set all 16 output pins thusly: Code:
OUTS = AutonProgNum |
|
#11
|
||||||
|
||||||
|
RoboEmu doesn't have the OUTH (or OUTL, etc) yet, but it should work by 2.0. From everything I've heard, OUTH should work just fine and I've even heard from one person that they used it in their code without any problems. out8-out15 are literally just bit-sized aliases into outh, which is just a byte-sized alias of outs, so I see no reason whatsoever that it shouldn't work.
--Rob |
|
#12
|
|||
|
|||
|
question: can you use outh during disabled mode, ie right before human player period? that way, you could use it to show what auto mode you are in, if you use multiple slots, and make sure your driver has your auton control board set the right slot. see just use the wheel on one of our joysticks to select slots, which means it is a pain to make sure you are in the right range. Also, back on topic, thats what we use comp mode for, to let us know auto mode hasnt started yet, so we dont start the counter for auto mode, and to read in what auton slot should be run. it would be harder without the bit!
|
|
#13
|
||||
|
||||
|
Quote:
if auton_mode = 1 then 'do auto stuff 'reinitialize timers and other crap here as well run 1 else 'do manual stuff endif That only activates autonomous programs when the bit is set, without worrying about comp_mode.. because what it is really doesn't matter to the program. So, still don't really see much usefulness for comp_mode yet.. but who cares anyways? If ya use it ya use it.. if you dont you dont. And I don't ![]() |
|
#14
|
|||||
|
|||||
|
Quote:
Quote:
|
|
#15
|
|||
|
|||
|
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Date for Cedar Point Gathering | Erin Rapacki | General Forum | 7 | 17-05-2003 22:42 |
| Video of 510 point round... | archiver | 2001 | 3 | 24-06-2002 01:57 |
| FIRST @ The Point...Who's Going? | archiver | 2000 | 0 | 23-06-2002 23:24 |
| Cedar Point Anyone? | archiver | 2000 | 9 | 23-06-2002 23:21 |
| What's the point of going to Nationals? | Ken Leung | General Forum | 10 | 08-10-2001 10:12 |