7 #include "SensorBase.h"
9 #include "NetworkCommunication/LoadOut.h"
10 #include "WPIErrors.h"
12 const uint32_t SensorBase::kSystemClockTicksPerMicrosecond;
13 const uint32_t SensorBase::kDigitalChannels;
14 const uint32_t SensorBase::kAnalogChannels;
15 const uint32_t SensorBase::kAnalogModules;
16 const uint32_t SensorBase::kDigitalModules;
17 const uint32_t SensorBase::kSolenoidChannels;
18 const uint32_t SensorBase::kSolenoidModules;
19 const uint32_t SensorBase::kPwmChannels;
20 const uint32_t SensorBase::kRelayChannels;
21 const uint32_t SensorBase::kChassisSlots;
22 SensorBase *SensorBase::m_singletonList = NULL;
49 m_nextSingleton = m_singletonList;
50 m_singletonList =
this;
60 for (
SensorBase *next = m_singletonList; next != NULL;)
63 next = next->m_nextSingleton;
66 m_singletonList = NULL;
76 if (nLoadOut::getModulePresence(nLoadOut::kModuleType_Analog, moduleNumber - 1))
88 if (nLoadOut::getModulePresence(nLoadOut::kModuleType_Digital, moduleNumber - 1))
120 if (nLoadOut::getModulePresence(nLoadOut::kModuleType_Solenoid, moduleNumber - 1))
134 if (channel > 0 && channel <= kDigitalChannels)
148 if (channel > 0 && channel <= kRelayChannels)
162 if (channel > 0 && channel <= kPwmChannels)
176 if (channel > 0 && channel <= kAnalogChannels)
188 if (channel > 0 && channel <= kSolenoidChannels)
static bool CheckDigitalChannel(uint32_t channel)
static bool CheckAnalogModule(uint8_t moduleNumber)
static bool CheckPWMChannel(uint32_t channel)
static void DeleteSingletons()
static bool CheckPWMModule(uint8_t moduleNumber)
static bool CheckRelayModule(uint8_t moduleNumber)
static bool CheckDigitalModule(uint8_t moduleNumber)
static bool CheckSolenoidModule(uint8_t moduleNumber)
static bool CheckRelayChannel(uint32_t channel)
void AddToSingletonList()
static bool CheckAnalogChannel(uint32_t channel)
static bool CheckSolenoidChannel(uint32_t channel)