Go to Post Duct tape can fix everything except relationships with other people. - dixonij [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
  #7   Spotlight this post!  
Unread 29-03-2004, 18:21
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: Sometimes autonomous cycles at half rate (19 Hz instead of 38 Hz)

Quote:
Try printing out the packet number after every Getdata. It's rxdata.packet_num or rxdata.packetnum or something like that (you want the packet number in rxdata, not txdata). If your packet number keep incrementing by 2, you're missing packets.
Aha! Finally, a test I can do. Thanks, that's very helpful!


Quote:
im not sure what your trackers are, but if they involve interrupts based on outside effects, then you may get varying amounts of interrupts thereby causing your code to take longer.
Yeah, that occured to me, too, but I don't know how to test for it.


Quote:
Any chance your code is taking too long?
Always a chance. But I tested it way back in January with a scope and found the non-auton code taking less than 5 ms. I kind of think the auton code is not 5 times longer. I thought of taking my scope on the plane to Atlanta, but the thought passed (Tek 475 -- about the size of another carry on, but much more fragile than my socks). Besides, I think Kevin Watson's unmodified tracker.hex code had this same behavior, too. I think, but I might not swear to it.


Quote:
do you have printf statements in your code?
Yes. Turning off printf is a good thing to try. I may write a dummyPrintf() function and #define printf dummyPrintf

Code:
void
dummyPrintf( char *s, ... )  // note the var arg "..."
{
  return;
}

// and later:
#define printf dummyPrintf
Do you think that will do what I want (shut down all printfs at once)?

I think printf's are always suspect since I found a strange behavior: I would upload the code, it would start running, flooding the screen with printf output, so much that when I stopped the RC the screen kept going for a second or so. Then the program would not run again after a reset. I had to download the code each time to run it once. I got rid of most of the printfs, and that self-destructive behavior went away. Beware printfs!

Thanks for all your inputs.

-norm
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
 


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
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
Flow rate / remaining pressure swabbie58 Pneumatics 5 11-02-2004 12:57
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


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

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