mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Expose and fix error where old subsystems were being referended after use in tests
Change-Id: I50e66b3d61f5c70dee653ab3e9899f2286f3741c
This commit is contained in:
@@ -26,6 +26,10 @@ Scheduler::Scheduler() :
|
||||
|
||||
m_table = NULL;
|
||||
m_enabled = true;
|
||||
m_runningCommandsChanged = false;
|
||||
toCancel = NULL;
|
||||
commands = NULL;
|
||||
ids = NULL;
|
||||
}
|
||||
|
||||
Scheduler::~Scheduler() {
|
||||
@@ -215,6 +219,19 @@ void Scheduler::RemoveAll() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Completely resets the scheduler. Undefined behavior if running.
|
||||
*/
|
||||
void Scheduler::ResetAll()
|
||||
{
|
||||
RemoveAll();
|
||||
m_subsystems.clear();
|
||||
m_buttons.clear();
|
||||
m_additions.clear();
|
||||
m_commands.clear();
|
||||
m_table = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the network tables associated with the Scheduler object on the SmartDashboard
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user