From: c vw Date: Fri, 31 Jan 2020 16:26:03 +0000 (+0100) Subject: correction for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side... X-Git-Url: https://git.rkrishnan.org/Site/%5B/%5D%20/uri//%22?a=commitdiff_plain;h=4283224629a77f2d4fa350903ee0acc72968eebe;p=pihpsdr.git correction for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tonecorrection for GPIO side tone --- diff --git a/iambic.c b/iambic.c index 7f58ebf..b8d3c2d 100644 --- a/iambic.c +++ b/iambic.c @@ -357,17 +357,18 @@ static void* keyer_thread(void *arg) { sem_wait(&cw_event); #endif + // swallow any cw_events posted during the last "cw hang" time. + if (!kcwl && !kcwr) continue; + // // If using GPIO side tone information, mute CW side tone // as long as the keyer thread is active // if (gpio_cw_sidetone_enabled()) { old_volume=cw_keyer_sidetone_volume; + cw_keyer_sidetone_volume=0; } - // swallow any cw_events posted during the last "cw hang" time. - if (!kcwl && !kcwr) continue; - // check mode: to not induce RX/TX transition if not in CW mode txmode=get_tx_mode(); if (!mox && cw_breakin && (txmode == modeCWU || txmode == modeCWL)) { @@ -614,13 +615,13 @@ static void* keyer_thread(void *arg) { #else clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &loop_delay, NULL); #endif - // - // If we have reduced the side tone volume, restore it! - // - if (gpio_cw_sidetone_enabled()) { - cw_keyer_sidetone_volume = old_volume; - } } + // + // If we have reduced the side tone volume, restore it! + // + if (gpio_cw_sidetone_enabled()) { + cw_keyer_sidetone_volume = old_volume; + } } fprintf(stderr,"keyer_thread: EXIT\n");