mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +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
@@ -58,8 +58,6 @@ DriverStation::DriverStation() {
|
||||
// It will signal when new packet data is available.
|
||||
HALSetNewDataSem(&m_packetDataAvailableCond);
|
||||
|
||||
AddToSingletonList();
|
||||
|
||||
m_task = Task("DriverStation", &DriverStation::Run, this);
|
||||
}
|
||||
|
||||
@@ -104,8 +102,8 @@ void DriverStation::Run() {
|
||||
* @return Pointer to the DS instance
|
||||
*/
|
||||
DriverStation& DriverStation::GetInstance() {
|
||||
static DriverStation* instance = new DriverStation();
|
||||
return *instance;
|
||||
static DriverStation instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user