Skip to content

Commit 454cf33

Browse files
authored
Merge pull request #780 from kkubicki/kkubicki-disable-sw-agc
welle-cli: disable software AGC in manual gain mode
2 parents 8426077 + 81dfcbd commit 454cf33

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/input/rtl_tcp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ void CRTL_TCP_Client::receiveData(void)
282282
dongleInfo.tuner_type << " " << TunerType << std::endl;
283283
std::clog << "RTL_TCP_CLIENT: Tuner gain count: " <<
284284
dongleInfo.tuner_gain_count << std::endl;
285+
286+
// Always use manual gain, the AGC is implemented in software
287+
setGainMode(1);
288+
setGain(currentGainCount);
289+
sendRate(INPUT_RATE);
290+
sendVFO(frequency);
285291
}
286292
else {
287293
std::clog << "RTL_TCP_CLIENT: Didn't find the \"RTL0\" magic key." <<
@@ -444,12 +450,6 @@ void CRTL_TCP_Client::receiveAndReconnect()
444450
std::clog << "RTL_TCP_CLIENT: Successful connected to server " <<
445451
std::endl;
446452

447-
// Always use manual gain, the AGC is implemented in software
448-
setGainMode(1);
449-
setGain(currentGainCount);
450-
sendRate(INPUT_RATE);
451-
sendVFO(frequency);
452-
453453
if (!agcRunning) {
454454
agcRunning = true;
455455
agcThread = std::thread(&CRTL_TCP_Client::agcTimer, this);

src/welle-cli/welle-cli.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ int main(int argc, char **argv)
522522
in->setAgc(true);
523523
}
524524
else {
525+
in->setAgc(false);
525526
in->setGain(options.gain);
526527
}
527528

0 commit comments

Comments
 (0)