mirror of
https://github.com/30hours/blah2.git
synced 2024-11-08 12:25:42 +00:00
Faster reload script and proper Rsp decimation handling
This commit is contained in:
parent
f4a4ffba41
commit
48900353c3
3 changed files with 30 additions and 4 deletions
|
@ -10,6 +10,7 @@ DIFF_TIMESTAMP=$(($CURR_TIMESTAMP-$TIMESTAMP))
|
||||||
|
|
||||||
if [[ "$FIRST_CHAR" != "{" ]] || [[ $DIFF_TIMESTAMP -gt 60 ]]; then
|
if [[ "$FIRST_CHAR" != "{" ]] || [[ $DIFF_TIMESTAMP -gt 60 ]]; then
|
||||||
docker compose -f /opt/blah2/docker-compose.yml down
|
docker compose -f /opt/blah2/docker-compose.yml down
|
||||||
|
kill -9 $(pgrep -f "sdrplay_apiService")
|
||||||
systemctl restart sdrplay.service
|
systemctl restart sdrplay.service
|
||||||
docker compose -f /opt/blah2/docker-compose.yml up -d
|
docker compose -f /opt/blah2/docker-compose.yml up -d
|
||||||
echo "Successfully restarted blah2"
|
echo "Successfully restarted blah2"
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
// class static constants
|
// class static constants
|
||||||
const double RspDuo::MAX_FREQUENCY_NR = 2000000000;
|
const double RspDuo::MAX_FREQUENCY_NR = 2000000000;
|
||||||
const uint8_t RspDuo::DEF_DECIMATION_NR = 1;
|
|
||||||
const int RspDuo::DEF_AGC_BANDWIDTH_NR = 50; // default agc bandwidth
|
const int RspDuo::DEF_AGC_BANDWIDTH_NR = 50; // default agc bandwidth
|
||||||
const int RspDuo::MIN_AGC_SET_POINT_NR = -72; // min agc set point
|
const int RspDuo::MIN_AGC_SET_POINT_NR = -72; // min agc set point
|
||||||
const int RspDuo::DEF_AGC_SET_POINT_NR = -60; // default agc set point
|
const int RspDuo::DEF_AGC_SET_POINT_NR = -60; // default agc set point
|
||||||
|
@ -51,7 +50,35 @@ RspDuo::RspDuo(std::string _type, uint32_t _fc, uint32_t _fs,
|
||||||
std::string _path, bool *_saveIq)
|
std::string _path, bool *_saveIq)
|
||||||
: Source(_type, _fc, _fs, _path, _saveIq)
|
: Source(_type, _fc, _fs, _path, _saveIq)
|
||||||
{
|
{
|
||||||
nDecimation = DEF_DECIMATION_NR;
|
if (fs == 2000000)
|
||||||
|
{
|
||||||
|
nDecimation = 1;
|
||||||
|
}
|
||||||
|
else if (fs == 1000000)
|
||||||
|
{
|
||||||
|
nDecimation = 2;
|
||||||
|
}
|
||||||
|
else if (fs == 500000)
|
||||||
|
{
|
||||||
|
nDecimation = 4;
|
||||||
|
}
|
||||||
|
else if (fs == 250000)
|
||||||
|
{
|
||||||
|
nDecimation = 8;
|
||||||
|
}
|
||||||
|
else if (fs == 125000)
|
||||||
|
{
|
||||||
|
nDecimation = 16;
|
||||||
|
}
|
||||||
|
else if (fs == 62500)
|
||||||
|
{
|
||||||
|
nDecimation = 32;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Error: RspDuo can only have decimation 1, 2, 4, 8, 16, 32";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
usb_bulk_fg = false;
|
usb_bulk_fg = false;
|
||||||
agc_bandwidth_nr = DEF_AGC_BANDWIDTH_NR;
|
agc_bandwidth_nr = DEF_AGC_BANDWIDTH_NR;
|
||||||
agc_set_point_nr = DEF_AGC_SET_POINT_NR;
|
agc_set_point_nr = DEF_AGC_SET_POINT_NR;
|
||||||
|
|
|
@ -50,8 +50,6 @@ private:
|
||||||
|
|
||||||
/// @brief Maximum frequency (Hz).
|
/// @brief Maximum frequency (Hz).
|
||||||
static const double MAX_FREQUENCY_NR;
|
static const double MAX_FREQUENCY_NR;
|
||||||
/// @brief Default decimation.
|
|
||||||
static const uint8_t DEF_DECIMATION_NR;
|
|
||||||
/// @brief Default AGC bandwidth.
|
/// @brief Default AGC bandwidth.
|
||||||
static const int DEF_AGC_BANDWIDTH_NR;
|
static const int DEF_AGC_BANDWIDTH_NR;
|
||||||
/// @brief Minimum AGC set point.
|
/// @brief Minimum AGC set point.
|
||||||
|
|
Loading…
Reference in a new issue