mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-02-15 18:08:43 +01:00
add new patreon to credits + fix USRP samplerate formatting
This commit is contained in:
parent
0e77a9f4ab
commit
d020640b7c
@ -77,9 +77,10 @@ namespace sdrpp_credits {
|
|||||||
"Kezza",
|
"Kezza",
|
||||||
"Krys Kamieniecki",
|
"Krys Kamieniecki",
|
||||||
"Lee Donaghy",
|
"Lee Donaghy",
|
||||||
"Lee KD1SQ",
|
"Lee (KD1SQ)",
|
||||||
".lozenge. (Hank Hill)",
|
".lozenge. (Hank Hill)",
|
||||||
"Martin Herren (HB9FXX)",
|
"Martin Herren (HB9FXX)",
|
||||||
|
"Nitin (VU2JEK)",
|
||||||
"ON4MU",
|
"ON4MU",
|
||||||
"Passion-Radio.com",
|
"Passion-Radio.com",
|
||||||
"Paul Maine",
|
"Paul Maine",
|
||||||
|
@ -448,9 +448,10 @@ For code changes, please create a feature request instead.
|
|||||||
* Kezza
|
* Kezza
|
||||||
* Krys Kamieniecki
|
* Krys Kamieniecki
|
||||||
* Lee Donaghy
|
* Lee Donaghy
|
||||||
* Lee KD1SQ
|
* Lee (KD1SQ)
|
||||||
* .lozenge. (Hank Hill)
|
* .lozenge. (Hank Hill)
|
||||||
* Martin Herren (HB9FXX)
|
* Martin Herren (HB9FXX)
|
||||||
|
* Nitin (VU2JEK)
|
||||||
* ON4MU
|
* ON4MU
|
||||||
* [Passion-Radio.com](https://passion-radio.com/)
|
* [Passion-Radio.com](https://passion-radio.com/)
|
||||||
* Paul Maine
|
* Paul Maine
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <uhd/device.hpp>
|
#include <uhd/device.hpp>
|
||||||
#include <uhd/usrp/multi_usrp.hpp>
|
#include <uhd/usrp/multi_usrp.hpp>
|
||||||
#include <utils/optionlist.h>
|
#include <utils/optionlist.h>
|
||||||
|
#include <utils/freq_formatting.h>
|
||||||
|
|
||||||
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
#define CONCAT(a, b) ((std::string(a) + b).c_str())
|
||||||
|
|
||||||
@ -143,7 +144,7 @@ public:
|
|||||||
for (const auto& l : srList) {
|
for (const auto& l : srList) {
|
||||||
double step = (l.step() == 0.0) ? 100e3 : l.step();
|
double step = (l.step() == 0.0) ? 100e3 : l.step();
|
||||||
for (double f = l.start(); f <= l.stop(); f += step) {
|
for (double f = l.start(); f <= l.stop(); f += step) {
|
||||||
samplerates.define(f, getBandwdithScaled(f), f);
|
samplerates.define(f, utils::formatFreq(f), f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -164,7 +165,7 @@ public:
|
|||||||
for (const auto& r : bwRange) {
|
for (const auto& r : bwRange) {
|
||||||
double step = (r.step() == 0.0) ? 100e3 : r.step();
|
double step = (r.step() == 0.0) ? 100e3 : r.step();
|
||||||
for (double i = r.start(); i <= r.stop(); i += step) {
|
for (double i = r.start(); i <= r.stop(); i += step) {
|
||||||
bandwidths.define((int)i, getBandwdithScaled(i), i);
|
bandwidths.define((int)i, utils::formatFreq(i), i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,20 +233,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string getBandwdithScaled(double bw) {
|
|
||||||
char buf[1024];
|
|
||||||
// if (bw >= 1000000.0) {
|
|
||||||
// sprintf(buf, "%.1lfMHz", bw / 1000000.0);
|
|
||||||
// }
|
|
||||||
// else if (bw >= 1000.0) {
|
|
||||||
// sprintf(buf, "%.1lfKHz", bw / 1000.0);
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
sprintf(buf, "%.1lfHz", bw);
|
|
||||||
//}
|
|
||||||
return std::string(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void menuSelected(void* ctx) {
|
static void menuSelected(void* ctx) {
|
||||||
USRPSourceModule* _this = (USRPSourceModule*)ctx;
|
USRPSourceModule* _this = (USRPSourceModule*)ctx;
|
||||||
|
|
||||||
@ -448,6 +435,7 @@ private:
|
|||||||
void worker() {
|
void worker() {
|
||||||
// TODO: Select a better buffer size that will avoid bad timing
|
// TODO: Select a better buffer size that will avoid bad timing
|
||||||
int bufferSize = sampleRate / 200;
|
int bufferSize = sampleRate / 200;
|
||||||
|
try {
|
||||||
while (true) {
|
while (true) {
|
||||||
uhd::rx_metadata_t meta;
|
uhd::rx_metadata_t meta;
|
||||||
void* ptr[] = { stream.writeBuf };
|
void* ptr[] = { stream.writeBuf };
|
||||||
@ -462,6 +450,10 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (const std::exception& e) {
|
||||||
|
flog::error("Failed to receive samples: {}", e.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
bool enabled = true;
|
bool enabled = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user