Go to Post I wouldn't want to face THAT bad boy in competition... - Iain McLeod [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 04-01-2005, 02:03
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Processing data quickly in autonomous

I'm working on some code that requires processing data more frequently than every 26.2ms. In driver-controlled mode, this is not a problem, because I can use Process_Data_From_Local_IO(). However, the autonomous function waits for statusflag.NEW_SPI_DATA before every loop. Is there any reason that I can't put a call to Process_Data_From_Local_IO() outside of that if statement? I can't imagine why it wouldn't work, but I want to make sure that it's not going to do bad things if I do.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #2   Spotlight this post!  
Unread 04-01-2005, 02:40
Tom Saxton's Avatar
Tom Saxton Tom Saxton is offline
Registered User
no team (Issaquah Robotics Society)
Team Role: Mentor
 
Join Date: Dec 2003
Rookie Year: 2003
Location: Sammamish, WA
Posts: 98
Tom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud ofTom Saxton has much to be proud of
Re: Processing data quickly in autonomous

Yeah, we did that last year, it worked great. You can also use interrupts, which we used for counting encoder ticks.
__________________
Tom Saxton
http://www.idleloop.com/
  #3   Spotlight this post!  
Unread 04-01-2005, 05:29
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Processing data quickly in autonomous

Yeah, interrupts are the only way to go for encoders. However, the interrupt handler is a bad place to be doing math for other sensors. Thanks for the info... being able to process data quickly in autonomous will help immensely.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #4   Spotlight this post!  
Unread 04-01-2005, 14:44
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Processing data quickly in autonomous

Quote:
Originally Posted by jgannon
I'm working on some code that requires processing data more frequently than every 26.2ms. In driver-controlled mode, this is not a problem, because I can use Process_Data_From_Local_IO(). However, the autonomous function waits for statusflag.NEW_SPI_DATA before every loop. Is there any reason that I can't put a call to Process_Data_From_Local_IO() outside of that if statement? I can't imagine why it wouldn't work, but I want to make sure that it's not going to do bad things if I do.
Actually, the call to Process_Data_From_Local_IO() IS outside of the if statement. And there is no waiting going on. The main loop simply checks the statusflag.NEW_SPI_DATA flag to see if new data is available from the master microprocessor. (It only reads memory. I doesn't make a function call.) If there is data available, it is processed, and then regardless of whether there was NEW_SPI_DATA available, it calls Process_Data_From_Local_IO.

[edit]
Sorry. I missed that you were talking about autonomous mode. I'll get back to you on that (if someone else doesn't beat me to it.)
[/edit]
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 04-01-2005 at 14:53.
  #5   Spotlight this post!  
Unread 04-01-2005, 14:45
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: Processing data quickly in autonomous

I tried to fix that, but I seemed to have failed. See this post: http://www.chiefdelphi.com/forums/sh...threadid=32073
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award
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
heres the code. y this not working omega Programming 16 31-03-2004 15:18
inputting data for autonomous mode Lou Programming 2 16-02-2004 22:26
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Limiting PWM in pbasic archiver 2001 4 24-06-2002 00:38


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

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