Fix Solenoid Resource object creation. Fixes artf4758.

Change-Id: I8b40d6606d7091fa6e8bf95b75f820e6b524ae06
This commit is contained in:
Kevin O'Connor
2015-12-14 13:45:56 -05:00
committed by Peter Johnson
parent bc0c895619
commit ec69c6a866
3 changed files with 4 additions and 7 deletions

View File

@@ -38,8 +38,7 @@ Solenoid::Solenoid(uint8_t moduleNumber, uint32_t channel)
wpi_setWPIErrorWithContext(ChannelIndexOutOfRange, buf.str());
return;
}
Resource::CreateResourceObject(m_allocated, kSolenoidChannels * 63);
Resource::CreateResourceObject(m_allocated, m_maxModules * m_maxPorts);
buf << "Solenoid " << m_channel << " (Module: " << m_moduleNumber << ")";
if (m_allocated->Allocate(m_moduleNumber * kSolenoidChannels + m_channel,
buf.str()) ==