Skip to content

Commit

Permalink
Merge pull request #780 from kkubicki/kkubicki-disable-sw-agc
Browse files Browse the repository at this point in the history
welle-cli: disable software AGC in manual gain mode
  • Loading branch information
mpbraendli authored Feb 19, 2024
2 parents 8426077 + 81dfcbd commit 454cf33
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/input/rtl_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ void CRTL_TCP_Client::receiveData(void)
dongleInfo.tuner_type << " " << TunerType << std::endl;
std::clog << "RTL_TCP_CLIENT: Tuner gain count: " <<
dongleInfo.tuner_gain_count << std::endl;

// Always use manual gain, the AGC is implemented in software
setGainMode(1);
setGain(currentGainCount);
sendRate(INPUT_RATE);
sendVFO(frequency);
}
else {
std::clog << "RTL_TCP_CLIENT: Didn't find the \"RTL0\" magic key." <<
Expand Down Expand Up @@ -444,12 +450,6 @@ void CRTL_TCP_Client::receiveAndReconnect()
std::clog << "RTL_TCP_CLIENT: Successful connected to server " <<
std::endl;

// Always use manual gain, the AGC is implemented in software
setGainMode(1);
setGain(currentGainCount);
sendRate(INPUT_RATE);
sendVFO(frequency);

if (!agcRunning) {
agcRunning = true;
agcThread = std::thread(&CRTL_TCP_Client::agcTimer, this);
Expand Down
1 change: 1 addition & 0 deletions src/welle-cli/welle-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ int main(int argc, char **argv)
in->setAgc(true);
}
else {
in->setAgc(false);
in->setGain(options.gain);
}

Expand Down

0 comments on commit 454cf33

Please sign in to comment.