code/WPILib/DoubleSolenoid.cpp
/**
 * Common function to implement constructor behavior.
 */
Common function to implement constructor behavior.
Common function to implement constructor behavior .
void DoubleSolenoid::InitSolenoid()
{
	if (CheckSolenoidModule(m_chassisSlot))
	{
		CheckSolenoidChannel(m_forwardChannel);
		CheckSolenoidChannel(m_reverseChannel);
		Resource::CreateResourceObject(&m_allocated, tSolenoid::kNumDO7_0Elements * kSolenoidChannels);
		m_allocated->Allocate(SlotToIndex(m_chassisSlot) * kSolenoidChannels + m_forwardChannel - 1);
		m_allocated->Allocate(SlotToIndex(m_chassisSlot) * kSolenoidChannels + m_reverseChannel - 1);
	}
	m_forwardMask = 1 << (m_forwardChannel - 1);
	m_reverseMask = 1 << (m_reverseChannel - 1);
}
void DoubleSolenoid :: InitSolenoid ( ) { if ( CheckSolenoidModule ( m_chassisSlot ) ) { CheckSolenoidChannel ( m_forwardChannel ) ; CheckSolenoidChannel ( m_reverseChannel ) ; Resource :: CreateResourceObject ( & m_allocated , tSolenoid :: kNumDO7_0Elements * kSolenoidChannels ) ; m_allocated -> Allocate ( SlotToIndex ( m_chassisSlot ) * kSolenoidChannels + m_forwardChannel - 1 ) ; m_allocated -> Allocate ( SlotToIndex ( m_chassisSlot ) * kSolenoidChannels + m_reverseChannel - 1 ) ; } m_forwardMask = 1 << ( m_forwardChannel - 1 ) ; m_reverseMask = 1 << ( m_reverseChannel - 1 ) ; }
Common function to implement constructor behavior.
Common function to implement constructor behavior .