View Single Post
  #9   Spotlight this post!  
Unread 11-02-2009, 22:54
MattD's Avatar
MattD MattD is offline
Registered User
AKA: Matthew Douglas
FRC #0228 (GUS Robotics)
Team Role: Alumni
 
Join Date: Feb 2006
Rookie Year: 2005
Location: Indianapolis, IN
Posts: 185
MattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to beholdMattD is a splendid one to behold
Send a message via AIM to MattD
Re: "Allocating channel or module that is out of range"

I'm assuming that when you were trying to use slot 6, you had code that may have looked something like this:

Code:
Solenoid *s = new Solenoid(6, 1);
However, when you tried out module 8 again, you didn't change that. If you try to use a slot other than 8 in the software, it will generate that fatal error. Since by default module 8 is selected, the simplest thing to do is only provide one parameter: the channel number.

Code:
Solenoid *s = new Solenoid(1);
__________________
GUS Robotics Team 228

2010 WPI Engineering Inspiration Award
2010 WPI Regional Champions (Thanks 230 & 20!)
2010 CT VEX Champions
2010 CT VEX Innovate Award
2009 QCC VEX Champions
2009 CT Motorola Quality Award
2007 CT J&J Sportsmanship Award
2006 CT Best Website Award