mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Cleaned up robot startup and cleanup/shutdown code (#77)
Cleaned up RobotBase, removed singleton list from SensorBase, and removed unused typedefs and NULL_TASK macro from HAL's Task.hpp. Making the robot class instance static fixed non-POD statics used by the instance during destruction from being destroyed first.
This commit is contained in:
committed by
Peter Johnson
parent
ecc210f99a
commit
d66c61a36e
@@ -25,8 +25,6 @@ class SensorBase : public ErrorBase {
|
||||
SensorBase(const SensorBase&) = delete;
|
||||
SensorBase& operator=(const SensorBase&) = delete;
|
||||
|
||||
static void DeleteSingletons();
|
||||
|
||||
static uint32_t GetDefaultSolenoidModule() { return 0; }
|
||||
|
||||
static bool CheckSolenoidModule(uint8_t moduleNumber);
|
||||
@@ -49,13 +47,7 @@ class SensorBase : public ErrorBase {
|
||||
static const uint32_t kChassisSlots = 8;
|
||||
|
||||
protected:
|
||||
void AddToSingletonList();
|
||||
|
||||
static void* m_digital_ports[kDigitalChannels];
|
||||
static void* m_relay_ports[kRelayChannels];
|
||||
static void* m_pwm_ports[kPwmChannels];
|
||||
|
||||
private:
|
||||
static SensorBase* m_singletonList;
|
||||
SensorBase* m_nextSingleton = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user