Go to Post Don't forget to stock up on luck. You'll need some of that too. - Molten [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 06-03-2008, 19:32
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: Interrupts, Interrupts, and more Interrupts!

Quote:
Originally Posted by Kevin Sevcik View Post
It might be nice to warn people trying this that all their operations on the data received from GetData() and sent to PutData() need to be atomic.

All rx/tx data fields are byte sized and therefore access to each field is atomic by default.
  #2   Spotlight this post!  
Unread 06-03-2008, 21:33
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Interrupts, Interrupts, and more Interrupts!

Quote:
Originally Posted by dcbrown View Post
All rx/tx data fields are byte sized and therefore access to each field is atomic by default.
Right, but the entire data structure is not. Look at how the IFI default code works -- it treats some of the PWM outputs as temporary locations before finishing the single-joystick mixing. This works fine when the get/put is done explicitly. If you have a need to coordinate values, you have to consider the possibility that the EasyC magic communication might happen when you've started setting them but haven't completed setting them all.
  #3   Spotlight this post!  
Unread 06-03-2008, 23:02
ManicMechanic ManicMechanic is offline
Registered User
AKA: Yolande
VRC #0438 (Metal Gear)
Team Role: Mentor
 
Join Date: Dec 2005
Rookie Year: 2003
Location: CA
Posts: 213
ManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond reputeManicMechanic has a reputation beyond repute
Re: Interrupts, Interrupts, and more Interrupts!

New question related to interrupts. I use EasyCv2 for Vex and would like to know how to read the values of the 6 interrupt ports (similar to the way that you use GetDigitalInput(I) to read one of the digital input ports). Basically, I want to create something similar to the FVC/FTC competition template but not be limited by the 20 second/2 minute demarcations of the template the way it currently exists.
__________________
He is no fool who gives what he cannot keep to gain that which he cannot lose. - Jim Elliot
  #4   Spotlight this post!  
Unread 06-03-2008, 23:12
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: Interrupts, Interrupts, and more Interrupts!

Quote:
Originally Posted by Alan Anderson View Post
Right, but the entire data structure is not. Look at how the IFI default code works -- it treats some of the PWM outputs as temporary locations before finishing the single-joystick mixing. This works fine when the get/put is done explicitly. If you have a need to coordinate values, you have to consider the possibility that the EasyC magic communication might happen when you've started setting them but haven't completed setting them all.
I keep forgetting about that. Doing stuff like that is just so foriegn to me, that is the rxdata as recieved data is "read only" in my mind.
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
How many interrupts is too many interrupts? Madison Programming 14 08-02-2008 12:09
More than 6 RC digital input interrupts? Jared Russell Programming 2 06-02-2007 15:41
Interrupts and Script Conundrums Jon236 Programming 2 08-02-2005 23:01
interrupts and putdata() doy Programming 4 23-02-2004 22:45
Interrupts and rotation sensors kor Programming 3 12-02-2004 11:05


All times are GMT -5. The time now is 23:46.

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