Go to Post Including the Kinect in the kit a parts is actually an evil plan. The programers are going to spend all their time playing with the Kinect. In competition the robot is just to sit there because it will not have a program. :ahh: - FrankJ [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
  #12   Spotlight this post!  
Unread 02-02-2003, 14:34
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Quote:
Originally posted by n[ate]vw
Let's say stack_pos=1 and sw_stacker=100

if stack_pos - sw_stacker > 10 then pos_error

Will this go to pos_error or not?
1-100= -99, which to the controller might be -99 or 157, depending on how it handles negative numbers in this situation.
why dont you just take a page out of innovationfirst's book and their basic programming to avoid negatives. try something like this:

if (((stack_pos + 100 - sw_stacker) Min 100) - 100) > 10 then {whatever}

anything that would be a negative number is instead turned into a zero, and all this code is looking at is whether it is less than 10 or not, not by how much it is less than ten.

-Anthony

P.S. i dont know the range of your values, so iff 100 is too little or too much, you can change it accordingly
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
 


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
Whose working this summer? Frank(Aflak) Chit-Chat 20 28-05-2003 11:35
pic: Working Hard, As Always CD47-Bot Extra Discussion 4 14-04-2003 09:07
Are ramp blocker bots working? Jim S Regional Competitions 42 22-03-2003 20:55
Please identify these two hard working hula 'botters! archiver 2001 2 24-06-2002 03:37
Anyone working on game/mod and looking for a 3d modeller? Devil's Kid 3D Animation and Competition 5 21-04-2002 15:08


All times are GMT -5. The time now is 16:48.

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