MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / actionOnMenuReset

Method actionOnMenuReset

src/AppFrame.cpp:1384–1425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1382}
1383
1384bool AppFrame::actionOnMenuReset(wxCommandEvent& event) {
1385
1386 if (event.GetId() == wxID_RESET) {
1387
1388 wxGetApp().getDemodMgr().terminateAll();
1389 wxGetApp().setFrequency(100000000);
1390 wxGetApp().getDemodMgr().setLastDemodulatorType("FM");
1391 demodModeSelector->setSelection(1);
1392 wxGetApp().getDemodMgr().setLastMuted(false);
1393 wxGetApp().getDemodMgr().setLastBandwidth(DEFAULT_DEMOD_BW);
1394 wxGetApp().getDemodMgr().setLastGain(1.0);
1395 wxGetApp().getDemodMgr().setLastSquelchLevel(-100);
1396 waterfallCanvas->setBandwidth(wxGetApp().getSampleRate());
1397 waterfallCanvas->setCenterFrequency(wxGetApp().getFrequency());
1398 spectrumCanvas->setBandwidth(wxGetApp().getSampleRate());
1399 spectrumCanvas->setCenterFrequency(wxGetApp().getFrequency());
1400 waterfallDataThread->setLinesPerSecond(DEFAULT_WATERFALL_LPS);
1401 waterfallCanvas->setLinesPerSecond(DEFAULT_WATERFALL_LPS);
1402 waterfallSpeedMeter->setLevel(sqrt(DEFAULT_WATERFALL_LPS));
1403 wxGetApp().getSpectrumProcessor()->setFFTAverageRate(0.65f);
1404 spectrumAvgMeter->setLevel(0.65f);
1405
1406 wxString titleBar = CUBICSDR_TITLE;
1407 //append the name of the current Device, if any.
1408 if (wxGetApp().getDevice()) {
1409 titleBar += " - " + wxGetApp().getDevice()->getName();
1410 }
1411
1412 SetTitle(titleBar);
1413 currentSessionFile = "";
1414 currentBookmarkFile = "";
1415 bookmarkSplitter->Unsplit(bookmarkView);
1416 bookmarkSplitter->SplitVertically(bookmarkView, mainVisSplitter, wxGetApp().getConfig()->getBookmarkSplit());
1417 hideBookmarksItem->Check(false);
1418 //force all windows refresh
1419 Refresh();
1420
1421 return true;
1422 }
1423
1424 return false;
1425}
1426
1427bool AppFrame::actionOnMenuAbout(wxCommandEvent& event) {
1428

Callers

nothing calls this directly

Calls 15

terminateAllMethod · 0.80
setSelectionMethod · 0.80
setLastMutedMethod · 0.80
setLastBandwidthMethod · 0.80
setLastGainMethod · 0.80
setLastSquelchLevelMethod · 0.80
setLevelMethod · 0.80
setFFTAverageRateMethod · 0.80
getSpectrumProcessorMethod · 0.80
getBookmarkSplitMethod · 0.80
getConfigMethod · 0.80

Tested by

no test coverage detected