diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-09-23 13:18:57 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-09-23 13:18:57 +0300 |
commit | c006deccbb21f48c7ece8c496dfd492c2ba739a2 (patch) | |
tree | 6ff83beebb9133528f87efa248e20c2132c946c3 /src/Accelerometers/Accelerometers.cpp | |
parent | 547a0a987ea54acdfa955c85ccb23ba1810416a4 (diff) |
Terminate accelerometer task when doing firmware update or estop
Diffstat (limited to 'src/Accelerometers/Accelerometers.cpp')
-rw-r--r-- | src/Accelerometers/Accelerometers.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Accelerometers/Accelerometers.cpp b/src/Accelerometers/Accelerometers.cpp index d105bf02..7548ae5a 100644 --- a/src/Accelerometers/Accelerometers.cpp +++ b/src/Accelerometers/Accelerometers.cpp @@ -505,6 +505,15 @@ unsigned int Accelerometers::GetLocalAccelerometerRuns() noexcept return numLocalRunsCompleted; } +void Accelerometers::Exit() noexcept +{ + if (accelerometerTask != nullptr) + { + accelerometerTask->TerminateAndUnlink(); + accelerometerTask = nullptr; + } +} + #if SUPPORT_CAN_EXPANSION // Process accelerometer data received over CAN |