Go to Post I also believe that any team in the finals or any 200 scores will be big. - henryBsick [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
  #1   Spotlight this post!  
Unread 26-01-2006, 14:38
sacr3denigma sacr3denigma is offline
Registered User
None #0280
 
Join Date: Jan 2006
Location: Taylor
Posts: 1
sacr3denigma is an unknown quantity at this point
Need help with our deadspace.

This is what we are using for our deadspace. Only problem with it is that it jumps from being 127 to say 142 without slowly getting up to speed. We would like to make this much smooth. I am fairly new at robot language but have c++ experience if that helps any. Please reply if you can help thankyou.
temp2 = (unsigned int)p2_y;

if (temp2 > (127 + DEADSPACE))
{
pwm02 = 255 - (unsigned char)(((temp2 - (127 + DEADSPACE)) * (127 / (127 - DEADSPACE))) + 127);
}
else if (temp2 < (127 - DEADSPACE))
{
pwm02 = 255 - (unsigned char)(temp2 * 127 / (127 - DEADSPACE));
}
else
{
pwm02 = 127;
}
 


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


All times are GMT -5. The time now is 09:46.

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