Thread: Encoder Limit
View Single Post
  #1   Spotlight this post!  
Unread 11-02-2009, 19:42
agough's Avatar
agough agough is offline
Registered User
FRC #0234 (Cyber Blue)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Indiana
Posts: 8
agough is an unknown quantity at this point
Question Encoder Limit

Is there an encoder limit?
I ask because when we build our program with 5 encoders used throughout it builds fine and it downloads but when we start it up our program won't run and tells us:
"Cannot allocate any more ports" check Resource.cpp line 61
We found nothing in Resource.cpp that is relevant.This is function/line it tells us to check(_=Space):
Quote:
UINT32 Resource::Allocate()
{
____for (UNIT32 i=0; i < m_size; i++
____{
__________if ( ! m_isAllocated[i])
__________{
__________m_isAllocated[i] = true;
__________return i;
__________} <-This is line 61
____}
____wpi_fatal(NoAvailablePorts);
____return 0;
}
If we comment out at least one encoder object creator and pointer(and it doesn't matter which one of the five we comment out) then the error doesn't show and everything else works.
__________________
"By failing to prepare, you are preparing to fail."-Benjamin Franklin
"Wise men talk because they have something to say; fools, because they have to say something."-Plato
Reply With Quote