mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
artf3622: Each Solenoid creates handles for all other Solenoids as well
Fixed so that one static handle is called for all Solenoids. Change-Id: Ib5f3bbaa160d253e0533259bfe0e9e2a6f11733f
This commit is contained in:
@@ -88,7 +88,7 @@ void Solenoid::Set(bool on)
|
||||
uint8_t value = on ? 0xFF : 0x00;
|
||||
uint8_t mask = 1 << m_channel;
|
||||
|
||||
SolenoidBase::Set(value, mask);
|
||||
SolenoidBase::Set(value, mask, m_moduleNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -99,7 +99,7 @@ void Solenoid::Set(bool on)
|
||||
bool Solenoid::Get()
|
||||
{
|
||||
if (StatusIsFatal()) return false;
|
||||
uint8_t value = GetAll() & ( 1 << m_channel);
|
||||
uint8_t value = GetAll(m_moduleNumber) & ( 1 << m_channel);
|
||||
return (value != 0);
|
||||
}
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ bool Solenoid::Get()
|
||||
*/
|
||||
bool Solenoid::IsBlackListed()
|
||||
{
|
||||
int value = GetPCMSolenoidBlackList() & ( 1 << m_channel);
|
||||
int value = GetPCMSolenoidBlackList(m_moduleNumber) & ( 1 << m_channel);
|
||||
return (value != 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user