From 6e3b59adb61e7bed5a839eab5628b96127ec4ecf Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 26 Apr 2024 17:44:33 -0400 Subject: [PATCH] cwFlowProc.cpp : Fix bugs in 'counter'. --- cwFlowProc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cwFlowProc.cpp b/cwFlowProc.cpp index b55993c..2e32245 100644 --- a/cwFlowProc.cpp +++ b/cwFlowProc.cpp @@ -4198,12 +4198,12 @@ namespace cw switch( p->mode_id ) { case kModuloModeId: - cnt -= (maxv-minv) + incr; + cnt = minv + (cnt-maxv); break; case kReverseModeId: p->dir = -1 * p->dir; - cnt = maxv - (cnt - maxv); + cnt = maxv - (cnt-maxv); break; case kClipModeId: @@ -4221,7 +4221,7 @@ namespace cw switch( p->mode_id ) { case kModuloModeId: - cnt += (maxv - minv) + incr; + cnt = maxv - (minv-cnt); break; case kReverseModeId: