mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-07-31 12:52:25 -04:00
Deprecate offset setting in session to avoid device conflict
Possible fix for session loading memory leak; may sometimes buffer IQ data to demodulators loaded outside of the current center and bandwidth that should be inactive.
This commit is contained in:
parent
f86950b334
commit
6e20f11680
@ -645,7 +645,6 @@ void AppFrame::saveSession(std::string fileName) {
|
|||||||
DataNode *header = s.rootNode()->newChild("header");
|
DataNode *header = s.rootNode()->newChild("header");
|
||||||
*header->newChild("version") = std::string(CUBICSDR_VERSION);
|
*header->newChild("version") = std::string(CUBICSDR_VERSION);
|
||||||
*header->newChild("center_freq") = wxGetApp().getFrequency();
|
*header->newChild("center_freq") = wxGetApp().getFrequency();
|
||||||
*header->newChild("offset") = wxGetApp().getOffset();
|
|
||||||
|
|
||||||
DataNode *demods = s.rootNode()->newChild("demodulators");
|
DataNode *demods = s.rootNode()->newChild("demodulators");
|
||||||
|
|
||||||
@ -684,14 +683,11 @@ bool AppFrame::loadSession(std::string fileName) {
|
|||||||
|
|
||||||
std::string version(*header->getNext("version"));
|
std::string version(*header->getNext("version"));
|
||||||
long long center_freq = *header->getNext("center_freq");
|
long long center_freq = *header->getNext("center_freq");
|
||||||
long long offset = *header->getNext("offset");
|
|
||||||
|
|
||||||
std::cout << "Loading " << version << " session file" << std::endl;
|
std::cout << "Loading " << version << " session file" << std::endl;
|
||||||
std::cout << "\tCenter Frequency: " << center_freq << std::endl;
|
std::cout << "\tCenter Frequency: " << center_freq << std::endl;
|
||||||
std::cout << "\tOffset: " << offset << std::endl;
|
|
||||||
|
|
||||||
wxGetApp().setFrequency(center_freq);
|
wxGetApp().setFrequency(center_freq);
|
||||||
wxGetApp().setOffset(offset);
|
|
||||||
|
|
||||||
DataNode *demodulators = l.rootNode()->getNext("demodulators");
|
DataNode *demodulators = l.rootNode()->getNext("demodulators");
|
||||||
|
|
||||||
@ -739,7 +735,7 @@ bool AppFrame::loadSession(std::string fileName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
newDemod->run();
|
newDemod->run();
|
||||||
|
newDemod->setActive(false);
|
||||||
wxGetApp().bindDemodulator(newDemod);
|
wxGetApp().bindDemodulator(newDemod);
|
||||||
|
|
||||||
std::cout << "\tAdded demodulator at frequency " << freq << " type " << type << std::endl;
|
std::cout << "\tAdded demodulator at frequency " << freq << " type " << type << std::endl;
|
||||||
|
@ -79,9 +79,6 @@ bool CubicSDR::OnInit() {
|
|||||||
devName.append(" [");
|
devName.append(" [");
|
||||||
devName.append((*devs_i)->getSerial());
|
devName.append((*devs_i)->getSerial());
|
||||||
devName.append("]");
|
devName.append("]");
|
||||||
if (!dev) {
|
|
||||||
dev = (*devs_i);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
devName.append(" (In Use?)");
|
devName.append(" (In Use?)");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user