From f25f773e7c3a517d4a6458a1d63ca09fd8d6c1a2 Mon Sep 17 00:00:00 2001 From: Tijs van Roon <1374848+knifter@users.noreply.github.com> Date: Tue, 22 Aug 2023 11:14:49 +0200 Subject: [PATCH] reset unlocked_last on saturation --- dualpid/src/pidloop.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dualpid/src/pidloop.cpp b/dualpid/src/pidloop.cpp index 55702d6..3eded57 100644 --- a/dualpid/src/pidloop.cpp +++ b/dualpid/src/pidloop.cpp @@ -108,6 +108,7 @@ void PIDLoop::calculate() if(!res) { _status = STATUS_ERROR; + _unlocked_last = now; return; };