2014-11-22 22:33:32 -05:00
|
|
|
#include <DemodulatorMgr.h>
|
2014-12-10 00:34:27 -05:00
|
|
|
#include <sstream>
|
|
|
|
#include <algorithm>
|
2014-12-10 21:22:13 -05:00
|
|
|
#include "CubicSDR.h"
|
2014-12-11 20:50:58 -05:00
|
|
|
#include <string>
|
|
|
|
#include <sstream>
|
2016-02-11 00:08:56 -05:00
|
|
|
#include <algorithm>
|
|
|
|
|
2016-02-29 23:14:23 -05:00
|
|
|
#if USE_HAMLIB
|
|
|
|
#include "RigThread.h"
|
|
|
|
#endif
|
|
|
|
|
2016-02-11 00:08:56 -05:00
|
|
|
bool demodFreqCompare (DemodulatorInstance *i, DemodulatorInstance *j) { return (i->getFrequency()<j->getFrequency()); }
|
|
|
|
bool inactiveCompare (DemodulatorInstance *i, DemodulatorInstance *j) { return (i->isActive()<j->isActive()); }
|
2014-11-22 22:33:32 -05:00
|
|
|
|
2016-05-31 19:58:37 -04:00
|
|
|
DemodulatorMgr::DemodulatorMgr() {
|
|
|
|
activeDemodulator = NULL;
|
|
|
|
lastActiveDemodulator = NULL;
|
|
|
|
activeVisualDemodulator = NULL;
|
|
|
|
lastBandwidth = DEFAULT_DEMOD_BW;
|
|
|
|
lastDemodType = DEFAULT_DEMOD_TYPE;
|
|
|
|
lastSquelchEnabled = false;
|
|
|
|
lastSquelch = -100;
|
|
|
|
lastGain = 1.0;
|
|
|
|
lastMuted = false;
|
|
|
|
lastDeltaLock = false;
|
2014-11-22 22:33:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorMgr::~DemodulatorMgr() {
|
2014-12-16 21:30:03 -05:00
|
|
|
terminateAll();
|
2014-11-22 22:33:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::newThread() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2014-12-16 21:30:03 -05:00
|
|
|
DemodulatorInstance *newDemod = new DemodulatorInstance;
|
2014-12-10 00:34:27 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
std::stringstream label;
|
|
|
|
label << demods.size();
|
|
|
|
newDemod->setLabel(label.str());
|
2016-05-31 19:58:37 -04:00
|
|
|
|
|
|
|
demods.push_back(newDemod);
|
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
return newDemod;
|
2014-11-22 22:33:32 -05:00
|
|
|
}
|
2014-11-23 19:39:27 -05:00
|
|
|
|
|
|
|
void DemodulatorMgr::terminateAll() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2014-12-16 21:30:03 -05:00
|
|
|
while (demods.size()) {
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
DemodulatorInstance *d = demods.back();
|
2015-01-10 22:45:39 -05:00
|
|
|
demods.pop_back();
|
2015-01-10 12:27:03 -05:00
|
|
|
wxGetApp().removeDemodulator(d);
|
2014-12-16 21:30:03 -05:00
|
|
|
deleteThread(d);
|
|
|
|
}
|
2014-11-23 19:39:27 -05:00
|
|
|
}
|
2014-11-26 21:05:19 -05:00
|
|
|
|
|
|
|
std::vector<DemodulatorInstance *> &DemodulatorMgr::getDemodulators() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2014-12-16 21:30:03 -05:00
|
|
|
return demods;
|
2014-11-26 21:05:19 -05:00
|
|
|
}
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2016-02-11 00:08:56 -05:00
|
|
|
std::vector<DemodulatorInstance *> DemodulatorMgr::getOrderedDemodulators(bool actives) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-02-11 00:08:56 -05:00
|
|
|
std::vector<DemodulatorInstance *> demods_ordered = demods;
|
|
|
|
if (actives) {
|
|
|
|
std::sort(demods_ordered.begin(), demods_ordered.end(), inactiveCompare);
|
|
|
|
std::vector<DemodulatorInstance *>::iterator i;
|
|
|
|
for (i = demods_ordered.begin(); i != demods_ordered.end(); i++) {
|
|
|
|
if ((*i)->isActive()) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == demods_ordered.end()) {
|
|
|
|
demods_ordered.erase(demods_ordered.begin(), demods_ordered.end());
|
|
|
|
} else if ((*i) != demods_ordered.front()) {
|
|
|
|
demods_ordered.erase(demods_ordered.begin(), i);
|
|
|
|
}
|
|
|
|
}
|
2016-06-02 17:56:31 -04:00
|
|
|
//if by chance they have the same frequency, keep their relative order
|
|
|
|
std::stable_sort(demods_ordered.begin(), demods_ordered.end(), demodFreqCompare);
|
2016-02-11 00:08:56 -05:00
|
|
|
return demods_ordered;
|
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getPreviousDemodulator(DemodulatorInstance *demod, bool actives) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-02-11 00:08:56 -05:00
|
|
|
if (!getLastActiveDemodulator()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
std::vector<DemodulatorInstance *> demods_ordered = getOrderedDemodulators(actives);
|
|
|
|
std::vector<DemodulatorInstance *>::iterator p = std::find(demods_ordered.begin(), demods_ordered.end(), demod);
|
|
|
|
if (p == demods_ordered.end()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
if (*p == demods_ordered.front()) {
|
|
|
|
return demods_ordered.back();
|
|
|
|
}
|
|
|
|
return *(--p);
|
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getNextDemodulator(DemodulatorInstance *demod, bool actives) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-02-11 00:08:56 -05:00
|
|
|
if (!getLastActiveDemodulator()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
std::vector<DemodulatorInstance *> demods_ordered = getOrderedDemodulators(actives);
|
|
|
|
std::vector<DemodulatorInstance *>::iterator p = std::find(demods_ordered.begin(), demods_ordered.end(), demod);
|
|
|
|
if (actives) {
|
|
|
|
|
|
|
|
}
|
|
|
|
if (p == demods_ordered.end()) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
if (*p == demods_ordered.back()) {
|
|
|
|
return demods_ordered.front();
|
|
|
|
}
|
|
|
|
return *(++p);
|
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getLastDemodulator() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-02-11 00:08:56 -05:00
|
|
|
std::vector<DemodulatorInstance *> demods_ordered = getOrderedDemodulators();
|
|
|
|
return *(demods_ordered.end());
|
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getFirstDemodulator() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-02-11 00:08:56 -05:00
|
|
|
std::vector<DemodulatorInstance *> demods_ordered = getOrderedDemodulators();
|
|
|
|
return *(demods_ordered.begin());
|
|
|
|
}
|
|
|
|
|
2014-12-10 21:22:13 -05:00
|
|
|
void DemodulatorMgr::deleteThread(DemodulatorInstance *demod) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
std::vector<DemodulatorInstance *>::iterator i;
|
2014-12-10 21:22:13 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
i = std::find(demods.begin(), demods.end(), demod);
|
2014-12-10 21:22:13 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
if (activeDemodulator == demod) {
|
|
|
|
activeDemodulator = NULL;
|
|
|
|
}
|
|
|
|
if (lastActiveDemodulator == demod) {
|
|
|
|
lastActiveDemodulator = NULL;
|
|
|
|
}
|
|
|
|
if (activeVisualDemodulator == demod) {
|
|
|
|
activeVisualDemodulator = NULL;
|
|
|
|
}
|
2014-12-10 21:22:13 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
if (i != demods.end()) {
|
|
|
|
demods.erase(i);
|
|
|
|
}
|
2016-07-03 03:47:28 -04:00
|
|
|
|
|
|
|
//Ask for termination
|
2015-01-10 12:27:03 -05:00
|
|
|
demod->terminate();
|
2014-12-11 19:07:21 -05:00
|
|
|
|
2016-07-03 03:47:28 -04:00
|
|
|
//Do not cleanup immediatly
|
2014-12-16 21:30:03 -05:00
|
|
|
demods_deleted.push_back(demod);
|
2014-12-10 21:22:13 -05:00
|
|
|
}
|
|
|
|
|
2016-07-03 03:47:28 -04:00
|
|
|
std::vector<DemodulatorInstance *> DemodulatorMgr::getDemodulatorsAt(long long freq, int bandwidth) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-07-03 03:47:28 -04:00
|
|
|
|
|
|
|
std::vector<DemodulatorInstance *> foundDemods;
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
for (int i = 0, iMax = demods.size(); i < iMax; i++) {
|
|
|
|
DemodulatorInstance *testDemod = demods[i];
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2015-02-02 18:24:04 -05:00
|
|
|
long long freqTest = testDemod->getFrequency();
|
|
|
|
long long bandwidthTest = testDemod->getBandwidth();
|
2015-01-04 17:11:20 -05:00
|
|
|
long long halfBandwidthTest = bandwidthTest / 2;
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2015-01-04 17:11:20 -05:00
|
|
|
long long halfBuffer = bandwidth / 2;
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2015-11-17 18:57:42 -05:00
|
|
|
if ((freq <= (freqTest + ((testDemod->getDemodulatorType() != "LSB")?halfBandwidthTest:0) + halfBuffer)) && (freq >= (freqTest - ((testDemod->getDemodulatorType() != "USB")?halfBandwidthTest:0) - halfBuffer))) {
|
2016-07-03 03:47:28 -04:00
|
|
|
foundDemods.push_back(testDemod);
|
2014-12-16 21:30:03 -05:00
|
|
|
}
|
|
|
|
}
|
2014-11-30 18:54:13 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
return foundDemods;
|
2014-11-30 18:54:13 -05:00
|
|
|
}
|
2014-12-10 00:34:27 -05:00
|
|
|
|
2016-01-13 21:29:26 -05:00
|
|
|
bool DemodulatorMgr::anyDemodulatorsAt(long long freq, int bandwidth) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2016-01-13 21:29:26 -05:00
|
|
|
for (int i = 0, iMax = demods.size(); i < iMax; i++) {
|
|
|
|
DemodulatorInstance *testDemod = demods[i];
|
|
|
|
|
|
|
|
long long freqTest = testDemod->getFrequency();
|
|
|
|
long long bandwidthTest = testDemod->getBandwidth();
|
|
|
|
long long halfBandwidthTest = bandwidthTest / 2;
|
|
|
|
|
|
|
|
long long halfBuffer = bandwidth / 2;
|
|
|
|
|
|
|
|
if ((freq <= (freqTest + ((testDemod->getDemodulatorType() != "LSB")?halfBandwidthTest:0) + halfBuffer)) && (freq >= (freqTest - ((testDemod->getDemodulatorType() != "USB")?halfBandwidthTest:0) - halfBuffer))) {
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2016-01-13 21:29:26 -05:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2016-01-13 21:29:26 -05:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-12-10 00:34:27 -05:00
|
|
|
void DemodulatorMgr::setActiveDemodulator(DemodulatorInstance *demod, bool temporary) {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2014-12-16 21:30:03 -05:00
|
|
|
if (!temporary) {
|
|
|
|
if (activeDemodulator != NULL) {
|
|
|
|
lastActiveDemodulator = activeDemodulator;
|
2015-11-26 01:54:54 -05:00
|
|
|
updateLastState();
|
2014-12-16 21:30:03 -05:00
|
|
|
} else {
|
|
|
|
lastActiveDemodulator = demod;
|
|
|
|
}
|
2015-02-02 20:10:55 -05:00
|
|
|
updateLastState();
|
2016-02-29 23:14:23 -05:00
|
|
|
#if USE_HAMLIB
|
|
|
|
if (wxGetApp().rigIsActive() && wxGetApp().getRigThread()->getFollowModem() && lastActiveDemodulator) {
|
|
|
|
wxGetApp().getRigThread()->setFrequency(lastActiveDemodulator->getFrequency(),true);
|
|
|
|
}
|
|
|
|
#endif
|
2016-06-02 21:48:01 -04:00
|
|
|
} else {
|
|
|
|
garbageCollect();
|
2016-06-07 19:54:36 -04:00
|
|
|
ReBufferGC::garbageCollect();
|
2014-12-16 21:30:03 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if (activeVisualDemodulator) {
|
|
|
|
activeVisualDemodulator->setVisualOutputQueue(NULL);
|
|
|
|
}
|
|
|
|
if (demod) {
|
|
|
|
demod->setVisualOutputQueue(wxGetApp().getAudioVisualQueue());
|
|
|
|
activeVisualDemodulator = demod;
|
|
|
|
} else {
|
|
|
|
DemodulatorInstance *last = getLastActiveDemodulator();
|
|
|
|
if (last) {
|
|
|
|
last->setVisualOutputQueue(wxGetApp().getAudioVisualQueue());
|
|
|
|
}
|
|
|
|
activeVisualDemodulator = last;
|
|
|
|
}
|
|
|
|
|
|
|
|
activeDemodulator = demod;
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2014-12-10 00:34:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getActiveDemodulator() {
|
2015-02-05 20:54:04 -05:00
|
|
|
if (activeDemodulator && !activeDemodulator->isActive()) {
|
|
|
|
activeDemodulator = getLastActiveDemodulator();
|
|
|
|
}
|
2014-12-16 21:30:03 -05:00
|
|
|
return activeDemodulator;
|
2014-12-10 00:34:27 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
DemodulatorInstance *DemodulatorMgr::getLastActiveDemodulator() {
|
2014-12-16 21:30:03 -05:00
|
|
|
return lastActiveDemodulator;
|
2014-12-10 00:34:27 -05:00
|
|
|
}
|
2014-12-11 19:07:21 -05:00
|
|
|
|
2016-06-02 17:56:31 -04:00
|
|
|
//Private internal method, no need to protect it with demods_busy
|
2014-12-11 19:07:21 -05:00
|
|
|
void DemodulatorMgr::garbageCollect() {
|
2014-12-16 21:30:03 -05:00
|
|
|
if (demods_deleted.size()) {
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
std::vector<DemodulatorInstance *>::iterator i;
|
2014-12-11 19:07:21 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
for (i = demods_deleted.begin(); i != demods_deleted.end(); i++) {
|
|
|
|
if ((*i)->isTerminated()) {
|
|
|
|
DemodulatorInstance *deleted = (*i);
|
|
|
|
demods_deleted.erase(i);
|
2014-12-11 19:07:21 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
std::cout << "Garbage collected demodulator instance " << deleted->getLabel() << std::endl;
|
2014-12-11 19:07:21 -05:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
delete deleted;
|
2016-05-31 19:58:37 -04:00
|
|
|
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2016-06-02 17:56:31 -04:00
|
|
|
|
2014-12-16 21:30:03 -05:00
|
|
|
}
|
2014-12-11 19:07:21 -05:00
|
|
|
}
|
|
|
|
|
2015-02-02 20:10:55 -05:00
|
|
|
void DemodulatorMgr::updateLastState() {
|
2016-06-02 17:56:31 -04:00
|
|
|
std::lock_guard < std::recursive_mutex > lock(demods_busy);
|
2015-02-02 20:10:55 -05:00
|
|
|
if (std::find(demods.begin(), demods.end(), lastActiveDemodulator) == demods.end()) {
|
2015-02-05 20:54:04 -05:00
|
|
|
if (activeDemodulator && activeDemodulator->isActive()) {
|
|
|
|
lastActiveDemodulator = activeDemodulator;
|
|
|
|
} else if (activeDemodulator && !activeDemodulator->isActive()){
|
|
|
|
activeDemodulator = NULL;
|
|
|
|
lastActiveDemodulator = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (lastActiveDemodulator && !lastActiveDemodulator->isActive()) {
|
|
|
|
lastActiveDemodulator = NULL;
|
2015-02-02 20:10:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if (lastActiveDemodulator) {
|
|
|
|
lastBandwidth = lastActiveDemodulator->getBandwidth();
|
|
|
|
lastDemodType = lastActiveDemodulator->getDemodulatorType();
|
2016-06-01 19:42:34 -04:00
|
|
|
lastDemodLock = lastActiveDemodulator->getDemodulatorLock()?true:false;
|
2015-02-02 20:10:55 -05:00
|
|
|
lastSquelchEnabled = lastActiveDemodulator->isSquelchEnabled();
|
|
|
|
lastSquelch = lastActiveDemodulator->getSquelchLevel();
|
|
|
|
lastGain = lastActiveDemodulator->getGain();
|
2015-11-26 01:54:54 -05:00
|
|
|
lastModemSettings[lastDemodType] = lastActiveDemodulator->readModemSettings();
|
2015-02-02 20:10:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
int DemodulatorMgr::getLastBandwidth() const {
|
|
|
|
return lastBandwidth;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastBandwidth(int lastBandwidth) {
|
2015-12-01 00:59:11 -05:00
|
|
|
if (lastBandwidth < MIN_BANDWIDTH) {
|
|
|
|
lastBandwidth = MIN_BANDWIDTH;
|
2015-02-02 20:10:55 -05:00
|
|
|
} else if (lastBandwidth > wxGetApp().getSampleRate()) {
|
|
|
|
lastBandwidth = wxGetApp().getSampleRate();
|
|
|
|
}
|
|
|
|
this->lastBandwidth = lastBandwidth;
|
|
|
|
}
|
|
|
|
|
2015-11-17 18:57:42 -05:00
|
|
|
std::string DemodulatorMgr::getLastDemodulatorType() const {
|
2015-02-02 20:10:55 -05:00
|
|
|
return lastDemodType;
|
|
|
|
}
|
|
|
|
|
2015-11-17 18:57:42 -05:00
|
|
|
void DemodulatorMgr::setLastDemodulatorType(std::string lastDemodType) {
|
2015-02-02 20:10:55 -05:00
|
|
|
this->lastDemodType = lastDemodType;
|
|
|
|
}
|
|
|
|
|
|
|
|
float DemodulatorMgr::getLastGain() const {
|
|
|
|
return lastGain;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastGain(float lastGain) {
|
|
|
|
this->lastGain = lastGain;
|
|
|
|
}
|
|
|
|
|
2016-02-15 17:43:10 -05:00
|
|
|
|
|
|
|
bool DemodulatorMgr::getLastDeltaLock() const {
|
|
|
|
return lastDeltaLock;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastDeltaLock(bool lock) {
|
|
|
|
lastDeltaLock = lock;
|
|
|
|
}
|
|
|
|
|
2015-02-02 20:10:55 -05:00
|
|
|
float DemodulatorMgr::getLastSquelchLevel() const {
|
|
|
|
return lastSquelch;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastSquelchLevel(float lastSquelch) {
|
|
|
|
this->lastSquelch = lastSquelch;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool DemodulatorMgr::isLastSquelchEnabled() const {
|
|
|
|
return lastSquelchEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastSquelchEnabled(bool lastSquelchEnabled) {
|
|
|
|
this->lastSquelchEnabled = lastSquelchEnabled;
|
|
|
|
}
|
|
|
|
|
2015-08-19 17:06:06 -04:00
|
|
|
bool DemodulatorMgr::isLastMuted() const {
|
|
|
|
return lastMuted;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastMuted(bool lastMuted) {
|
|
|
|
this->lastMuted = lastMuted;
|
|
|
|
}
|
|
|
|
|
2015-11-26 01:54:54 -05:00
|
|
|
ModemSettings DemodulatorMgr::getLastModemSettings(std::string modemType) {
|
|
|
|
return lastModemSettings[modemType];
|
|
|
|
}
|
|
|
|
|
|
|
|
void DemodulatorMgr::setLastModemSettings(std::string modemType, ModemSettings settings) {
|
|
|
|
lastModemSettings[modemType] = settings;
|
|
|
|
}
|