From e7c54f019faecf5f867f4814c27b96bddb9b60bf Mon Sep 17 00:00:00 2001 From: Yann Locatelli Date: Wed, 20 Dec 2023 13:32:01 +0100 Subject: [PATCH] Finalize last TODO with must_stop --- libs/BehaviorKit/source/behaviors/AutochargeSeal.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/BehaviorKit/source/behaviors/AutochargeSeal.cpp b/libs/BehaviorKit/source/behaviors/AutochargeSeal.cpp index 91f658074a..2d79ab0eaa 100644 --- a/libs/BehaviorKit/source/behaviors/AutochargeSeal.cpp +++ b/libs/BehaviorKit/source/behaviors/AutochargeSeal.cpp @@ -22,14 +22,15 @@ auto AutochargeSeal::convertToPwmFrom(float angle) const -> float return res; } +// LCOV_EXCL_START void AutochargeSeal::run() { - must_stop = true; // TODO: Update for UT - - do { + must_stop = false; + while (!must_stop) { loop(); - } while (!must_stop); + } } +// LCOV_EXCL_STOP void AutochargeSeal::loop() {