Go to Post Tell them your newfound passion for FIRST as a program, and let them know all you're doing is getting more involved to broaden your FIRST horizon - Dorienne [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 16-01-2002, 22:45
Jnadke Jnadke is offline
Go Badgers!
#0093
Team Role: Alumni
 
Join Date: Jan 2002
Location: Appleton, WI
Posts: 775
Jnadke is on a distinguished road
Send a message via ICQ to Jnadke Send a message via AIM to Jnadke Send a message via Yahoo to Jnadke
Re: This is easily done...

Quote:
Originally posted by Joe Johnson
Suppose you have a switch called p1_trig.

.....
If p1_trig = 0 then DoNothing
Left_wheels = 254 - (Left_wheels MAX 254)
Right_wheels = 254 - (Right_wheels MAX 254)
DoNothing:
....

K.I.S.S.

Left_wheels = ~Left_wheels
Right_wheels = ~Right_wheels


Just a simple inverse of the bits. As long as you do that min and max stuff where it is supposed to be done (in the drive calculations), you should be fine.
 


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
question about one joystick drive programing james700 Programming 13 29-01-2003 14:49
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


All times are GMT -5. The time now is 05:34.

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