From a80cc7620047876a6605cbf9fa92eb61ef2280e9 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Tue, 7 Aug 2018 15:39:56 +0200
Subject: [PATCH] Do not activate CW vox while PTT is manually set.

---
 iambic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/iambic.c b/iambic.c
index 0f5bf47..e013605 100644
--- a/iambic.c
+++ b/iambic.c
@@ -164,8 +164,9 @@ void keyer_event(int gpio, int level) {
     if (state) {
         // This is for aborting CAT CW messages if the key is hit.
 	cw_key_hit = 1;
-        // we do PTT as soon as possible ...
-        if (running && !cwvox) {
+        // we do PTT as soon as possible, but disable cwvox if
+	// PTT has been engaged manually
+        if (running && !cwvox && !mox) {
 	   g_idle_add(ext_mox_update, (gpointer)(long) 1);
            cwvox=(int) vox_hang;
 	}
-- 
2.45.2