Explicitly stop the PIDController Notifier in the destructor (#48)

This helps reduce the probability of a PID Controller Segmentation Fault.
This commit is contained in:
Thad House
2016-05-22 23:24:10 -07:00
committed by Peter Johnson
parent 21b1e39b2a
commit e842ff7ad5

View File

@@ -78,6 +78,8 @@ void PIDController::Initialize(float Kp, float Ki, float Kd, float Kf,
}
PIDController::~PIDController() {
//forcefully stopping the notifier so the callback can successfully run.
m_controlLoop->Stop();
if (m_table != nullptr) m_table->RemoveTableListener(this);
}