Go to Post Lesson learned, /always/ have a pick list! - Lil' Lavery [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
  #8   Spotlight this post!  
Unread 19-01-2008, 13:34
dcbrown dcbrown is offline
Registered User
AKA: Bud
no team
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Hollis,NH
Posts: 236
dcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud ofdcbrown has much to be proud of
Re: Robot Timing Code

"It's a nifty bit of code, but you can't use the wait() function on the IFI Robot Controller. "

You really need to qualify that since it is not true in all cases.

You can call wait functions at user level (non-interrupt routine level) in EasyC, MPLAB/WPILIB, and other environments.

In these cases the get/put data routines are run at interrupt level off the system clock ISR. Doing this stuff in the background/at interrupt level means you don't have to worry about what you're doing at the non-interrupt level like doing wait() calls. As long as you don't disable interrupts or don't perform waits at interrupt level then it will work just fine.

Bud
PS the other nifty thing that easyc/wpilib does is the system clock notices when autonomous period ends and causes the processor to do a warm reset/reboot from interrupt level effectively exiting autonomous and when the main loops starts again, the operator call/loop is run. I'd done something similar, but did so by putting a call marker on the h/w stack and then at interrupt level when auto mode ended I popped stuff off the stack until I hit the marker and then did a return from interrupt level so in main it looked like the auto() routine had returned by itself. The warm reboot is easier/faster but that means you have to go through the c main startup/init code again.
 


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
timing of re-contact Gary Dillard Rules/Strategy 16 19-01-2008 14:09
autonomous timing seanl Programming 6 09-03-2007 09:42
Download code from robot Luminous Programming 4 25-05-2005 13:32
Timing Codes Ryan Cumings Programming 11 29-01-2004 22:26
Default Robot Code lvhsrobotics Programming 2 10-01-2003 16:55


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

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