Go to Post And when I heard the word "Mentor Round" - you had me SOLD. - Chris is me [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-02-2005, 06:31
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
using limit_switch_max/min in autonomus

when the entire project is compilied will functions in user_routines.c be accessable in user_routines_fast.c. mainly the limit_switch_max defintion, and the limit_switch_min definition.
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


  #2   Spotlight this post!  
Unread 11-02-2005, 10:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: using limit_switch_max/min in autonomus

Quote:
Originally Posted by CmptrGk
when the entire project is compilied will functions in user_routines.c be accessable in user_routines_fast.c. mainly the limit_switch_max defintion, and the limit_switch_min definition.
Yes.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 11-02-2005, 10:40
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
Re: using limit_switch_max/min in autonomus

somewhat related.... why does the limit max funxtion require that you add 2000, only to disregard it in the function itself?
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)
  #4   Spotlight this post!  
Unread 11-02-2005, 11:27
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: using limit_switch_max/min in autonomus

Quote:
Originally Posted by Leav
somewhat related.... why does the limit max funxtion require that you add 2000, only to disregard it in the function itself?
That's carried over from the PBASIC controller which didn't deal with negative numbers correctly (or at all, I can't remember). I scrapped the Limit_Mix function and wrote my own MIN & MAX macros. Here's what our code looks like:

Code:
int right_drive_speed, left_drive_speed

right_drive_speed = (int)Oi_drive_y + (int)Oi_drive_x - 127;
MIN(right_drive_speed, 0);
MAX(right_drive_speed, 254);

left_drive_speed = (int)Oi_drive_y - (int)Oi_drive_x + 127;
MIN(left_drive_speed, 0);
MAX(left_drive_speed, 254);
In my opinion it's much more readable than the code IFI gave us, and it doesn't have the unnecessary 2000 addition / subtraction.
  #5   Spotlight this post!  
Unread 11-02-2005, 11:32
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: using limit_switch_max/min in autonomus

Quote:
Originally Posted by Leav
somewhat related.... why does the limit max funxtion require that you add 2000, only to disregard it in the function itself?
Leav,

This question was asked on the FIRST Greater Toronto Regional forum a while ago, and I've attached a link below to the response there.

http://www.firstcanadianregional.org...opic.php?t=500

-SlimBoJones...
Closed Thread


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
FIRST Time Autonomus Help rcubes85 Programming 1 22-01-2005 11:52
autonomus mode zooballski Rules/Strategy 2 13-01-2005 17:23
cant get into autonomus blindguyinanorg Programming 7 20-02-2004 17:06


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

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