Go to Post It goes to show how a FIRST team is not one person but a complex codependence of people who are all striving to meet the same goal. - Bill_Hancoc [more]
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
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
  #3   Spotlight this post!  
Unread 14-01-2008, 18:05
Abrakadabra Abrakadabra is offline
Here We Go !!!
AKA: Scott Kukshtel, Mr. K
FRC #3467 (The Windham Windup!)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2002
Location: Windham, New Hampshire
Posts: 160
Abrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant futureAbrakadabra has a brilliant future
Re: Programming the Infrared board

Hi Brad -

Thanks for doing this. This is also a good example of showing that you can use the IFI headers in a WPILib program, something that's not so apparent on first glance.

Some questions:

- I think I understand what RegisterRepeatingTimer() does, although it is not really documented. The header file says that timer interrupt handlers are "called with interrupts disabled". However, do you not also need to disable interrupts when you access the shared globals in the main( ) routine?

- The variables "changed" and "previous" in your ISR don't seem to do anything? Again, I think I understand what you are trying to do (e.g. collect all the commands in between times that the program actually checks for them), but "previous" never gets set to anything other than zero, and "changed" is calculated, but then not used. Would it not be simpler to just say:
Code:
 irCommands |= current;
and then the main() routine can turn off each bit as it gets processed? I think that's what the code is essentially doing now, since "previous" is always zero.
Reply With Quote
 


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
pic: Programming prototyping board Andrew Schuetze Extra Discussion 3 08-12-2007 18:30
Perf Board = BS2-IC Carrier Board? indieFan Electrical 2 16-09-2004 08:28
What is the true field infrared emitter? scottm87 Programming 4 20-04-2004 18:22
Ordering the TSOP34840 Infrared Receivers yaman Electrical 5 23-01-2004 02:10
Infrared Beacon Board AlphaOmega870 Electrical 5 23-01-2004 01:58


All times are GMT -5. The time now is 21: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