View Single Post
  #3   Spotlight this post!  
Unread 01-04-2010, 22:58
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Possibility of Controller Overload using Compressor

The reason I added the calls in Teleop was because the single call in Begin wasn't enabling the compressor. I tried calling it once, and it just didn't enable. So then I called it in the loop. And it worked. So I left it.

Code:
relay8_fwd = !rc_dig_in18;
This is what IFI had for their compressor. WPI has:
Compressor->Open, which opens two RT-FIFO's and a Digital Input and a Relay, then begins asynchronous execution of a thread dedicated to polling the compressor.
Comrpessor->Run (thread) - polls compressor as fast as possible, assuming no delays from RT-FIFO (greg claims it does wait for new data).
Compressor->Start - sets RT-FIFO to enabled
Compressor->Stop - sets RT-FIFO to disabled
Compressor->Enabled - gets RT-FIFO for enabled and switch state
Compressor->Close - Closes RT-FIFO. The Run thread closes itself when RT-FIFO spits an error out (assuming that the RT-FIFO was closed).
All the complexity to take the place of that one line of code.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote