1
1
//
2
2
// This file is part of Dire Wolf, an amateur radio packet TNC.
3
3
//
4
- // Copyright (C) 2011, 2013, 2014, 2015, 2016, 2017 John Langner, WB2OSZ
4
+ // Copyright (C) 2011, 2013, 2014, 2015, 2016, 2017, 2023 John Langner, WB2OSZ
5
5
//
6
6
// This program is free software: you can redistribute it and/or modify
7
7
// it under the terms of the GNU General Public License as published by
@@ -176,6 +176,7 @@ typedef int HANDLE;
176
176
#include "audio.h"
177
177
#include "ptt.h"
178
178
#include "dlq.h"
179
+ #include "demod.h" // to mute recv audio during xmit if half duplex.
179
180
180
181
181
182
#if __WIN32__
@@ -1141,6 +1142,8 @@ void ptt_init (struct audio_s *audio_config_p)
1141
1142
*
1142
1143
*--------------------------------------------------------------------*/
1143
1144
1145
+ // JWL - save status and new get_ptt function.
1146
+
1144
1147
1145
1148
void ptt_set (int ot , int chan , int ptt_signal )
1146
1149
{
@@ -1164,6 +1167,19 @@ void ptt_set (int ot, int chan, int ptt_signal)
1164
1167
return ;
1165
1168
}
1166
1169
1170
+ // New in 1.7.
1171
+ // A few people have a really bad audio cross talk situation where they receive their own transmissions.
1172
+ // It usually doesn't cause a problem but it is confusing to look at.
1173
+ // "half duplex" setting applied only to the transmit logic. i.e. wait for clear channel before sending.
1174
+ // Receiving was still active.
1175
+ // I think the simplest solution is to mute/unmute the audio input at this point if not full duplex.
1176
+
1177
+ #ifndef TEST
1178
+ if ( ! save_audio_config_p -> achan [chan ].fulldup ) {
1179
+ demod_mute_input (chan , ptt_signal );
1180
+ }
1181
+ #endif
1182
+
1167
1183
/*
1168
1184
* The data link state machine has an interest in activity on the radio channel.
1169
1185
* This is a very convenient place to get that information.
0 commit comments