Go to Post Even though others have had success, I will be honest, this method sort of creeps me out. - Joe Johnson [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2000
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 22:23
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: Here's a theory....

Posted by Jerry Eckert.

Engineer from Looking for a team in Raleigh, NC sponsored by .

Posted on 3/16/2000 8:26 AM MST


In Reply to: Here's a theory.... posted by Mike Gray on 3/16/2000 7:27 AM MST:




: For reverse: Assume that the filtered joystick value ranges from 127 to 255. You multiply by 3 and divide by 2, then clamp at 126, so the member never moves...UNTIL the joystick exceeds 170 counts. Since p1_yfilt is a single byte, it rolls over beyond 255 counts and its value then becomes 0. Full speed, turbo, wrong direction.

: Floating point math: 171*3/2=256.5

: Integer math: 171*3/2=0

Computations are performed using a 16-bit scratchpad and truncated, if necessary, when the final result is stored. In the example above, evaluation of the expression yields a result of 256. The MAX function then clamps the value at 126 before it is stored in the 8-bit destination.



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Battlebots I.Q.- A serious threat to FIRST or a half thought up cheep copy? Joe Matt General Forum 75 17-10-2005 20:43
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Anyone looking for more program space? archiver 2001 13 24-06-2002 02:20
robot control emulator for default or other program CharlieWilken Programming 26 24-02-2002 02:36
control program looping??? ctartist236 Programming 1 08-02-2002 10:09


All times are GMT -5. The time now is 18:59.

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