Go to Post Rain? Prepare for Armageddon to strike when you go to St. Louis. Two years in St. Louis. Two years of Tornado scares. Tis the season. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 24-01-2015, 12:12
jfitz0807 jfitz0807 is offline
Registered User
FRC #2877 (Ligerbots)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Newton, MA
Posts: 67
jfitz0807 is an unknown quantity at this point
Another DoubleSolenoid question

We're constructing our DoubleSolenoid as follows in RobotMap.cpp

pneumaticSubsystemSolenoid = new DoubleSolenoid(11, 0, 1);

The '11' is the CAN ID of the PCM. With these parameters, our compressor starts automatically as expected. However, we're getting the following error:

Error on line 87 of Resource.cpp: Allocating channel that is out of range: Solenoid 0 (Module: 11)

When we change the '11' to a '1', this error goes away, but our compressor doesn't start.

Any thoughts?
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2015, 14:51
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 523
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Another DoubleSolenoid question

Hmm it looks like that assert will trip on anything >= PCM Device ID 8....
Quote:
const uint32_t solenoid_kNumDO7_0Elements = 8;
...HAL.cpp in wpilib. This gets passed into a Resource object which trips on line 87 of Resource.cpp.

Not sure if that's the intent of the code's author, but I would keep the device ID less than '8' just to be safe. Hopefully you have less than 8 PCMs!

The reason changing the param in your c'tor to '1' from '11' breaks the compressor is likely because you didn't change the PCM ID to '1' in the RIO web-page config.

Setting the device ID...
http://wpilib.screenstepslive.com/s/...ribution-panel
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2015, 20:14
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: Another DoubleSolenoid question

Why have you changed your PCM from the default ID of 0?
Reply With Quote
Reply


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


All times are GMT -5. The time now is 13:56.

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