Go to Post (We're going to get a team going up here, I have faith. And nerds.) - ScoutingNerd175 [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2003, 16:52
JLambert's Avatar
JLambert JLambert is offline
Registered User
#0151 (Wild Cards)
 
Join Date: Jan 2003
Location: Nashua, NH
Posts: 49
JLambert is an unknown quantity at this point
Send a message via ICQ to JLambert Send a message via AIM to JLambert Send a message via Yahoo to JLambert
User mode toggling

I'm not sure if anyone would know this, but is there a way (in coding) to make a button my controls (p2_trig for example) toggle the OI display between user mode (u000) and something else like team number (0151)?
__________________
Justin Lambert
02-03: Programmer Team #151
  #2   Spotlight this post!  
Unread 23-02-2003, 18:22
rbayer's Avatar Unsung FIRST Hero
Happy Birthday! rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Nope. Unfortunately, what is displayed on the OI is controlled by the uP's inside the OI, which aren't accessible from the RC. The only thing you can control is what is displayed while the OI is in user mode and the 9 (if you include basic run) LEDs you have direct control over.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #3   Spotlight this post!  
Unread 25-02-2003, 05:47
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
As stated, you cannot control the OI from your joystick, but you can control what your User Mode displays. Just leave the OI in user_mode, and use "selection buttons" on your console.

vbutton, &c, are aliases for console buttons (OI_swAb.bit#), temp is a scratch pad, byte-size variable. The way this is arranged, if two people want to see different things (volts & direction, say) the first branch gets priority, so they will see voltage in the user window.

program snippet....

if vbutton then show_volts
if dbutton then show_direction

show_amps:
temp = sensor3
goto show_it

show_volts:
temp = battery_volts (=sensor8) * bewitch_factor
goto show_it

show_direction:
temp = gyro_heading.highbyte

show_it:
out8 = temp.bit0
out9 = temp.bit1
out10 = temp.bit2
out11 = temp.bit3
out12 = temp.bit4
out13 = temp.bit5
out14 = temp.bit6
out15 = temp.bit7

...rest of program

Last edited by Lloyd Burns : 25-02-2003 at 05:55.
Closed Thread


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
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
autonomous mode timer Don Programming 6 09-02-2003 22:16
Select button and user mode n[ate]vw Programming 2 20-01-2003 16:33


All times are GMT -5. The time now is 22:21.

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