cwFlowProc.cpp : More counter improvements.

This commit is contained in:
kevin 2024-04-26 17:47:34 -04:00
parent 95ae6d0525
commit c7cd952fcc

View File

@ -4198,11 +4198,13 @@ namespace cw
switch( p->mode_id )
{
case kModuloModeId:
while(cnt > maxv )
cnt = minv + (cnt-maxv);
break;
case kReverseModeId:
p->dir = -1 * p->dir;
while( cnt > maxv )
cnt = maxv - (cnt-maxv);
break;
@ -4221,11 +4223,13 @@ namespace cw
switch( p->mode_id )
{
case kModuloModeId:
while( cnt < minv )
cnt = maxv - (minv-cnt);
break;
case kReverseModeId:
p->dir = -1 * p->dir;
while(cnt < minv )
cnt = minv + (minv-cnt);
break;