Go to Post I actually love and am very thankful for what all these amazing engineering role models put into this program year in and year out. - Bill Gold [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
  #3   Spotlight this post!  
Unread 31-01-2008, 00:55
divergentdave divergentdave is offline
Registered User
FRC #1816 (Green Machine)
 
Join Date: Jun 2006
Rookie Year: 2007
Location: MN
Posts: 35
divergentdave is a jewel in the roughdivergentdave is a jewel in the roughdivergentdave is a jewel in the rough
Send a message via AIM to divergentdave
Re: 1 Joystick Control

Quote:
Originally Posted by usbcd36 View Post
...Simplest way to do that is subtract the value you assign to the PWM outputs from 254:
Actually you should subtract from 255 in this case. (if Limit_Mix returns you a 255, then pwm13=254-255=-1, but the -1 wraps over the unsigned char to 255, whereas if you subtract from 255, then you will correctly get 0) So, that line should read
Code:
pwm13 = pwm14 = 255 - Limit_Mix(2000 + p1_y + p1_x - 127);
__________________
Team 1816 - The Green Machine
 


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
Joystick control rotated? silliewillie Control System 6 12-02-2005 21:23
We need help with joystick control Team ICE #1611 Control System 4 24-01-2005 15:57
Single joystick control problem Mr. Van Programming 7 23-11-2004 09:10
One Joystick Control KWalsh Programming 4 24-02-2004 17:53
Control System, Joystick mod? Jordan A. Technical Discussion 16 13-02-2002 02:29


All times are GMT -5. The time now is 19:11.

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