|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
|
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 |