From 30efcd014fd00783ad66efafbcebaae782c63d80 Mon Sep 17 00:00:00 2001 From: Eric Dropps Date: Fri, 24 Oct 2025 16:39:00 -0600 Subject: [PATCH] Fix Serial PTT lines not being released Fix a small Boolean logic bug that prevents the negative DTR and negative RTS lines from being reset properly when PTT is released. --- src/rig/rigcontrol.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rig/rigcontrol.cpp b/src/rig/rigcontrol.cpp index c006eec..47b4c6d 100644 --- a/src/rig/rigcontrol.cpp +++ b/src/rig/rigcontrol.cpp @@ -415,9 +415,9 @@ void rigControl::activatePTT(bool b) { ioctl(serialP,TIOCMGET,&modemlines); if(catParams.activeDTR) modemlines |= TIOCM_DTR; - if(catParams.activeRTS)modemlines |= TIOCM_RTS; + if(catParams.activeRTS) modemlines |= TIOCM_RTS; if(catParams.nactiveDTR) modemlines &= ~TIOCM_DTR; - if(catParams.nactiveRTS)modemlines &= ~TIOCM_RTS; + if(catParams.nactiveRTS) modemlines &= ~TIOCM_RTS; ioctl(serialP,TIOCMSET,&modemlines); //ioctl(serial,TIOCMBIS,&t); } @@ -426,8 +426,8 @@ void rigControl::activatePTT(bool b) ioctl(serialP,TIOCMGET,&modemlines); if(catParams.activeDTR) modemlines &= ~TIOCM_DTR; if(catParams.activeRTS) modemlines &= ~TIOCM_RTS; - if(catParams.nactiveDTR) modemlines |= ~TIOCM_DTR; - if(catParams.nactiveRTS)modemlines |= ~TIOCM_RTS; + if(catParams.nactiveDTR) modemlines |= TIOCM_DTR; + if(catParams.nactiveRTS) modemlines |= TIOCM_RTS; ioctl(serialP,TIOCMSET,&modemlines); } }