Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Commit

Permalink
Fix Pluto(?) and better Bias Tee support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerbo committed Dec 30, 2021
1 parent d618013 commit 9fd4093
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ jobs:
cp "C:/Program Files/PothosSDR/bin/mirisdr.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/mir_sdr_api.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/libiio.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/libad9361.dll" LeanHRPT-Demod/bin/;
cp -r "C:/Program Files/PothosSDR/lib/SoapySDR/modules0.8" LeanHRPT-Demod/lib/SoapySDR/;
7z a LeanHRPT-Demod.zip LeanHRPT-Demod'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ jobs:
cp "C:/Program Files/PothosSDR/bin/mirisdr.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/mir_sdr_api.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/libiio.dll" LeanHRPT-Demod/bin/;
cp "C:/Program Files/PothosSDR/bin/libad9361.dll" LeanHRPT-Demod/bin/;
cp -r "C:/Program Files/PothosSDR/lib/SoapySDR/modules0.8" LeanHRPT-Demod/lib/SoapySDR/;
7z a LeanHRPT-Demod.zip LeanHRPT-Demod'

Expand Down
7 changes: 5 additions & 2 deletions src/io/sdr_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,24 @@ class SDRSource : public FileReader {

bool has_biastee() {
for (const auto &setting : sdr->getSettingInfo()) {
if (setting.key == "biastee") {
if (setting.key == "biastee" || setting.key == "biasT_ctrl" || setting.key == "bias_tx") {
bias_name = setting.key;
return true;
}
}

return false;
}
void set_biastee(double enabled) { sdr->writeSetting("biastee", enabled ? "true" : "false"); }
void set_biastee(double enabled) { sdr->writeSetting(bias_name, enabled ? "true" : "false"); }

std::vector<std::string> antennas() { return sdr->listAntennas(SOAPY_SDR_RX, 0);}
void set_antenna(const std::string &antenna) { return sdr->setAntenna(SOAPY_SDR_RX, 0, antenna); }
std::string antenna() { return sdr->getAntenna(SOAPY_SDR_RX, 0); }
private:
SoapySDR::Device *sdr;
SoapySDR::Stream *stream = nullptr;

std::string bias_name;
};

#endif

0 comments on commit 9fd4093

Please sign in to comment.