Go to Post Like my programming class teacher has said multiple times: "Stop complaining on reddit about your code not compiling and actually fix it". - [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
  #15   Spotlight this post!  
Unread 31-03-2004, 10:09
DKolberg DKolberg is offline
Mentor Iron Giants
AKA: David Kolberg
FRC #5069 (Iron Giants)
Team Role: Mentor
 
Join Date: May 2002
Rookie Year: 2000
Location: South Bend
Posts: 44
DKolberg has a spectacular aura aboutDKolberg has a spectacular aura about
Re: Despite what IFI says, you can configure autonomous from OI...

We used the OI to program our autonomous mode and stored the mode in eeprom to ensure that it is available at all times. We only allow the mode to be changed while not in competition mode. We also used the leds on the OI to indicate the mode selected. We used the Switch LEDs to indicate 1 of 8 modes for autonomous and the Relay2 to indicate either left or right operation. This allowed quick verification / changes before the match began and could be programmed at any time prior to the match. Storing the mode in eeprom allows the mode to be maintained while power is off until the next time the mode is programmed.

if(compeition_mode !=0)
{
if (grabButton == 1 & freeButton == 1)
{
autonLR = autonMode & 0x8;
autonMode = ((armCmdInput-8) >> 5) & 0x7;
if (upButton == 1) {autonLR = 8;}
if (statButton == 1) {autonLR = 0;}
autonMode = autonMode + autonLR;
}
else
{
if (autonMode != autonEEP) //Update eeprom as necessary
{
writeEE (1,autonMode);
autonEEP = autonMode;
}
}
}

...

if(compeition_mode !=0)
{
Switch1_LED = (autonMode&0x4)>>2;
Switch2_LED = (autonMode&0x2)>>1;
Switch3_LED = (autonMode&0x1);
Relay2_green = (autonMode < 8);
Relay2_red = (autonMode > 7);
}


Dave
SBotz
 


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
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
IFI Loader Problems BrendaB Programming 3 24-01-2004 22:45
variable? manodrum Programming 11 01-04-2003 17:20
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


All times are GMT -5. The time now is 15:43.

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