Go to Post Just to be clear, NOTHING anyone says here is a confirmation. The ONLY source for official answers to questions like this is the FIRST Q&A system. - dlavery [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
  #1   Spotlight this post!  
Unread 11-01-2003, 13:37
rosebud rosebud is offline
Registered User
#0115 (MVRT)
 
Join Date: Sep 2002
Location: California
Posts: 24
rosebud is on a distinguished road
buttons (continued from post in electrical)

im extremely confused about buttons. ive read the section in the basic manual several times, and played with them a little. however, ive gotten two conflicting definitions of the last parameter on target state. 1) that is says which state the button should be in in order to branch 2) that when in downstate, 0 it doesnt branch and 1 it does. also, ive been trying to program a kill switch in that is basically a button statement that says when the button is pressed, goto a subroutine that puts the program into an infinite loop. ive written this program before for the edu robot and had it work, and i also have last year's code which is working. but mine isnt, and i cant figure out why.the program goes into the kill switch subroutine whether the button is pressed or not, and wont get out of the subroutine. here is the code:
the pin is p4_sw_aux1, and ive already tested the mechanical switch and it works physically.

**ive been informed that the button command is not valid for us. any thoughts?

*in main section
BUTTON p4_sw_aux1, 0, 255, 0, wksp, 0, KillSwitch:

*in subroutine section
KillSwitch:
Serin COMA\COMB, INBAUD, [oi_swA,oi_swB,rc_swA,rc_swB,p2_x,p1_x,p4_x,p3_x,P
B_mode,packet_num,p2_y,p1_y,p4_y,p3_y,p2_wheel,p1_
wheel,p4_wheel,p3_wheel]


BUTTON p4_sw_aux1, 0, 255, 0, wksp,1, Mainloop:

Serout USERCPU, OUTBAUD, [255,255,127,0,127, 0, 127,127,127,127,127,127,127,127,127,127,127,127,12
7,127]

GOTO KillSwitch:
 


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
ChiefDelphi Forums Community Bulletin Brandon Martus CD Forum Support 0 30-03-2003 23:00
ChiefDelphi Forums Community Bulletin Brandon Martus CD Forum Support 0 12-01-2003 22:19
ChiefDelphi Forums Community Bulletin Brandon Martus CD Forum Support 0 05-01-2003 22:04
ChiefDelphi Forums Community Bulletin Brandon Martus CD Forum Support 0 05-05-2002 22:07
ChiefDelphi Forums Community Bulletin Brandon Martus CD Forum Support 0 28-04-2002 22:53


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

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