Go to Post Upon entering FIRST you immediately apply Murphy's Laws. - A_Reed [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
  #24   Spotlight this post!  
Unread 02-02-2004, 21:53
MichalSkiba MichalSkiba is offline
Low-Power BiCMOS Brain
#0854 (M.I.R.)
 
Join Date: Apr 2003
Location: TORONTO
Posts: 64
MichalSkiba will become famous soon enough
Re: Desensitizing Joysticks

This is what I came up with during our team's meeting today after school:

/*
pwm is a jostick value, 0-254
pwm_in is the pwm_out of the default code
pwm_out is the new value going to the joysticks
null_zone_swing_fraction is the amount you'd want the joystick to move without the motors kicking in.
*/

pwm_out = (pwm_in / (1-null_zone_swing_fraction)) - null_zone_swing_fraction(1 - null_zone_swing_fraction)

So. Its quite simply a y = mx + b "transfer" function. enjoy.
__________________
<<<theoldmanskiba>>>

2003 Canadian Regional Delphi Driving Tomorrow's Technology Award winners
 


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
Programming joysticks NoRemorse Programming 29 24-02-2004 20:26
number of joysticks doy Rules/Strategy 5 01-02-2004 00:05
Team 524 has Team 362's spare joysticks from last year. archiver 2001 0 24-06-2002 02:36
Could use some help with joysticks . . . archiver 2001 5 23-06-2002 23:36
Calibrating speed controllers and joysticks thedillybar Technical Discussion 4 11-02-2002 13:24


All times are GMT -5. The time now is 02:07.

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