Go to Post I'm intrigued by the possibility of Mayan stadium sports, minus the whole sacrificing part. - AlecMataloni [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 15-01-2003, 10:40
cammie825 cammie825 is offline
Registered User
#0825 (Maximum Velocity)
 
Join Date: Jan 2003
Location: Galax, VA
Posts: 8
cammie825 is an unknown quantity at this point
Send a message via ICQ to cammie825
Joystick

I had a question about the abilities of our joysticks. Is there a way to program the buttons or triggers so that when you continuously hold the trigger the action is performed, and when the trigger is released the action stops?
  #2   Spotlight this post!  
Unread 15-01-2003, 10:48
D.Viddy's Avatar
D.Viddy D.Viddy is offline
Registered User
AKA: Dylan Vester
FRC #3176 (Purple Precision)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Camby, IN
Posts: 44
D.Viddy is an unknown quantity at this point
Of course

It's going to look something like this (note: I use the underscores for indention purposes only, do not include them in your code):

'If port1 trigger is pressed then
If p1_sw_trig = 1 then
_____'Perform Action Here
endif

Or if you wanted it so when you pressed a joy button it would turn an action on, and when you pressed it again, it would do another action then:

'Declare this variable at top of code
action_on VAR byte

'If port1 trigger is pressed then
If p1_sw_trig = 1 then
_____'Switch from on to off
_____toggle action_on
endif

'If alternate action is specified then
If action_on = 1 then
____'Do action here
else
____'Do another action here
end if
__________________
.................................................. .........
Dylan Vester - (Programmer)
Running a P4 1.8 Ghz
Team 998, We can't win...
.................................................. .........
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
how do i control a piston with a joystick Ryan Foley Programming 2 27-05-2003 17:13
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
joystick problem archiver 2000 12 23-06-2002 23:08
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


All times are GMT -5. The time now is 09:24.

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