mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-09-28 08:16:37 -04:00
Active modem tracking; update only when necessary
This commit is contained in:
parent
f4ab6fbaad
commit
367a723947
@ -58,3 +58,11 @@ BookmarkList BookmarkMgr::getBookmarks(std::string group, std::string folder) {
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
void BookmarkMgr::updateActiveList() {
|
||||
BookmarkView *bmv = wxGetApp().getAppFrame()->getBookmarkView();
|
||||
|
||||
if (bmv) {
|
||||
bmv->updateActiveList();
|
||||
}
|
||||
}
|
@ -42,6 +42,8 @@ public:
|
||||
void removeBookmark(std::string group, BookmarkEntry *be);
|
||||
BookmarkList getBookmarks(std::string group, std::string folder = "");
|
||||
|
||||
void updateActiveList();
|
||||
|
||||
protected:
|
||||
|
||||
BookmarkMap bmData;
|
||||
|
@ -80,6 +80,8 @@ DemodulatorInstance::~DemodulatorInstance() {
|
||||
delete pipeIQDemodData;
|
||||
delete threadQueueControl;
|
||||
delete pipeAudioData;
|
||||
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
|
||||
void DemodulatorInstance::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQueue) {
|
||||
@ -118,6 +120,7 @@ void DemodulatorInstance::run() {
|
||||
|
||||
active = true;
|
||||
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
|
||||
void DemodulatorInstance::updateLabel(long long freq) {
|
||||
@ -125,6 +128,7 @@ void DemodulatorInstance::updateLabel(long long freq) {
|
||||
newLabel.precision(3);
|
||||
newLabel << std::fixed << ((long double) freq / 1000000.0);
|
||||
setLabel(newLabel.str());
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
|
||||
void DemodulatorInstance::terminate() {
|
||||
@ -227,6 +231,8 @@ void DemodulatorInstance::setActive(bool state) {
|
||||
tracking = false;
|
||||
}
|
||||
active = state;
|
||||
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
|
||||
void DemodulatorInstance::squelchAuto() {
|
||||
@ -391,6 +397,10 @@ void DemodulatorInstance::setFrequency(long long freq) {
|
||||
wxGetApp().getRigThread()->setFrequency(freq,true);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (this->isActive()) {
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
}
|
||||
|
||||
long long DemodulatorInstance::getFrequency() {
|
||||
|
@ -4,7 +4,7 @@
|
||||
BookmarkView::BookmarkView( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : BookmarkPanel(parent, id, pos, size, style) {
|
||||
|
||||
activeBranch = m_treeView->AddRoot("Active");
|
||||
doUpdateActive = true;
|
||||
// doUpdateActive = true;
|
||||
m_updateTimer.Start(500);
|
||||
}
|
||||
|
||||
@ -12,7 +12,7 @@ void BookmarkView::onUpdateTimer( wxTimerEvent& event ) {
|
||||
if (doUpdateActive) {
|
||||
doUpdateActiveList();
|
||||
|
||||
// doUpdateActive = false;
|
||||
doUpdateActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user