Go to Post In most cases on FIRST robots, we have more material than in we need in some places and less than we need in others. That single phenomenon is the leading cause of robot failures. - Paul Copioli [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 18-01-2004, 23:50
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Placement of Navigate ()

Ok, I'm not sure if this is my sleep-deprivation (yes, already), or I actually picked something up, but I can't make sense of this.

In user_routines_fast.c, Navigate() is called from Process_Data_From_Local_IO. Navigate however, needs to output it's data somewhere, and from my understanding, you need to excute putdata(&txdata) to output data, but I can't find a putdata(&txdata) after Navigate() is called.

So, does this mean I'm blind and unable to see lines of code, or that it's just not put in the right place?

I'd test myself, but I want to make sure before I put the code into the robot that it's not going to kill it.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #2   Spotlight this post!  
Unread 19-01-2004, 00:50
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Placement of Navigate ()

Quote:
Originally Posted by Ian W.
In user_routines_fast.c, Navigate() is called from Process_Data_From_Local_IO. Navigate however, needs to output it's data somewhere, and from my understanding, you need to excute putdata(&txdata) to output data, but I can't find a putdata(&txdata) after Navigate() is called.
The pwmxx variables are global, so they'll be updated the next time putdata() is called in user_routines.c/Process_Data_From_Master_uP().



Quote:
Originally Posted by Ian W.
So, does this mean I'm blind and unable to see lines of code, or that it's just not put in the right place?
Navigate() will need to be called from User_Autonomous_Code() instead of Process_Data_From_Local_IO() if you want to use it during autonomous period. It was placed where it is now so that we could start the demo by pulling the trigger on the joystick.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #3   Spotlight this post!  
Unread 19-01-2004, 00:52
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Placement of Navigate ()

I haven't worked too much with the new code as of yet as I've been doing electrical systems so far but from my understanding the Process_Data_From_Local_IO() function is called with every program loop. Is there any reason for putting your Navigate() function in this rather than the time-controlled process function?

Second, the Putdata() function is declared in the IFI_default.h file, making it global to all functions in files including this file. The function should be usable within your Navigate() function or any other function you declare.
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #4   Spotlight this post!  
Unread 19-01-2004, 01:06
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Re: Placement of Navigate ()

Quote:
Originally Posted by Adam Shapiro
I haven't worked too much with the new code as of yet as I've been doing electrical systems so far but from my understanding the Process_Data_From_Local_IO() function is called with every program loop. Is there any reason for putting your Navigate() function in this rather than the time-controlled process function?

Second, the Putdata() function is declared in the IFI_default.h file, making it global to all functions in files including this file. The function should be usable within your Navigate() function or any other function you declare.
Yeah, I was aware that you could call Putdata() anywhere, but I saw references to the fact that this code was used in the Kickoff demo, so I figured either I accidentally deleted something, or it did something I didn't understand.

I still don't see any reason for putting Navigate() in the user_routines_fast.c file though.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #5   Spotlight this post!  
Unread 19-01-2004, 01:07
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
Re: Placement of Navigate ()

Quote:
Originally Posted by Kevin Watson
The pwmxx variables are global, so they'll be updated the next time putdata() is called in user_routines.c/Process_Data_From_Master_uP().
Ah, ok, I wasn't sure if the GetData() call would overwrite them at all, as I haven't looked through absolutely everything yet.
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #6   Spotlight this post!  
Unread 19-01-2004, 01:08
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Placement of Navigate ()

Quote:
Originally Posted by Adam Shapiro
I haven't worked too much with the new code as of yet as I've been doing electrical systems so far but from my understanding the Process_Data_From_Local_IO() function is called with every program loop. Is there any reason for putting your Navigate() function in this rather than the time-controlled process function?
Yes, to minimize latency between clock (and beacon data) updates and when Navigate() is called.

Quote:
Originally Posted by Adam Shapiro
Second, the Putdata() function is declared in the IFI_default.h file, making it global to all functions in files including this file. The function should be usable within your Navigate() function or any other function you declare.
I suspect sprinkling calls to Putdata() throughout your code is asking for trouble.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 19-01-2004, 01:13
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Placement of Navigate ()

Quote:
Originally Posted by Kevin Watson
I suspect sprinkling calls to Putdata() throughout your code is asking for trouble.
Yea, I could see where it might cause some issues
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #8   Spotlight this post!  
Unread 19-01-2004, 01:23
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Placement of Navigate ()

Quote:
Originally Posted by Ian W.
Ah, ok, I wasn't sure if the GetData() call would overwrite them at all, as I haven't looked through absolutely everything yet.
Getdata() doesn't overwrite the pwmxx variables.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #9   Spotlight this post!  
Unread 19-01-2004, 03:24
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Placement of Navigate ()

Getdata does just that, it gets input data, and putdata puts output data - the output values are never overwritten (except by your code), just processed.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #10   Spotlight this post!  
Unread 19-01-2004, 14:16
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Placement of Navigate ()

Quote:
Originally Posted by Ian W.
Yeah, I was aware that you could call Putdata() anywhere, but I saw references to the fact that this code was used in the Kickoff demo, so I figured either I accidentally deleted something, or it did something I didn't understand.

I still don't see any reason for putting Navigate() in the user_routines_fast.c file though.
Because YOU edit it. the only things you NEED to edit are User_Routines.h, User_Routines.c, and User_Routines_Fast.c
  #11   Spotlight this post!  
Unread 19-01-2004, 14:37
PuiChi PuiChi is offline
Confound it!
AKA: Bernice Yau
#0840 (ART)
Team Role: Programmer
 
Join Date: Jan 2004
Location: San Mateo, CA
Posts: 7
PuiChi is an unknown quantity at this point
Question Re: Placement of Navigate ()

I'm new and know nothing about the IR navigation code. So where would you edit the navigation code? =o___O;;=
  #12   Spotlight this post!  
Unread 19-01-2004, 19:50
Adam Shapiro's Avatar
Adam Shapiro Adam Shapiro is offline
Registered User
FRC #0555 (Montclair Robotics)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Montclair, NJ
Posts: 401
Adam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud ofAdam Shapiro has much to be proud of
Send a message via AIM to Adam Shapiro
Re: Placement of Navigate ()

Quote:
Originally Posted by PuiChi
I'm new and know nothing about the IR navigation code. So where would you edit the navigation code?
That depends on what you want to do with it. Most likely you want to use it during the autonomous mode, in which case I believe it would go in the User_Routines_Fast.c in the User_Autonomous_Code() function (although you could create your own functions/names and move thing around).
__________________
Mentor to Teams 555, 1929, and 2070!
Currently working in hardware design at Cisco.
Cornell University DARPA Urban Challenge - http://www.cornellracing.com
Co-Captain Team 555 - 2003,2004,2005
Trust, Love, and Magic
  #13   Spotlight this post!  
Unread 20-01-2004, 18:41
Teh Kaj Teh Kaj is offline
Registered User
AKA: David Chin
#0840 (ART)
Team Role: Programmer
 
Join Date: Jan 2004
Location: San Mateo, CA
Posts: 4
Teh Kaj is an unknown quantity at this point
Send a message via AIM to Teh Kaj
Re: Placement of Navigate ()

How would you point out in the area to the nav code in that area? I get that's the place you would edit, but how would add it in? Would you simply make a duplicate copy of the code in that area?
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
Placement of bins... Useless member Regional Competitions 0 09-03-2003 11:12
Q&A Discuss: Rotating-Light Placement CD47-Bot Extra Discussion 6 28-01-2003 15:38
Placement of Robot Shawn60 Rules/Strategy 3 18-01-2003 23:51
Rotating-Light Placement Winged Globe Rules/Strategy 1 07-01-2003 22:44
Placement of stuff in the box... archiver 2000 1 24-06-2002 00:19


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

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