From: wittend99 Date: Tue, 23 Oct 2012 22:07:13 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@799 01035d8c-6547-0410-b346-abe4f9... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=3ba1269aa383fc691520600d7e33fc541705b897;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@799 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/build/fdmdv2.mk b/fdmdv2/build/fdmdv2.mk index 3df229a2..804ec4cf 100644 --- a/fdmdv2/build/fdmdv2.mk +++ b/fdmdv2/build/fdmdv2.mk @@ -2,18 +2,18 @@ ## Auto Generated makefile by CodeLite IDE ## any manual changes will be erased ## -## Debug +## Release ProjectName :=fdmdv2 -ConfigurationName :=Debug +ConfigurationName :=Release WorkspacePath := "C:\bin\Projects\Radio\fdmdv2\build" ProjectPath := "C:\bin\Projects\Radio\fdmdv2\build" -IntermediateDirectory :=./Debug +IntermediateDirectory :=./Release OutDir := $(IntermediateDirectory) CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=OFA-Staff -Date :=10/22/2012 +Date :=10/23/2012 CodeLitePath :="C:\bin\CodeLite" LinkerName :=g++ SharedObjectLinkerName :=g++ -shared -fPIC @@ -35,8 +35,8 @@ PreprocessOnlySwitch :=-E ObjectsFileList :="C:\bin\Projects\Radio\fdmdv2\build\fdmdv2.txt" PCHCompileFlags := MakeDirCommand :=makedir -LinkOptions := -mwindows $(shell wx-config --debug=yes --libs --unicode=yes) -IncludePath := $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.6.1/msys/1.0/local/include $(IncludeSwitch)../../codec2-dev/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/include +LinkOptions := -mwindows -s $(shell wx-config --debug=no --libs --unicode=yes) +IncludePath := $(IncludeSwitch). $(IncludeSwitch)/bin/MinGW-4.6.1/msys/1.0/local/include $(IncludeSwitch)../../codec2-dev/src $(IncludeSwitch)/bin/Projects/Audio/libsndfile/ IncludePCH := RcIncludePath := Libs := $(LibrarySwitch)sndfile-1 $(LibrarySwitch)codec2 $(LibrarySwitch)portaudio $(LibrarySwitch)portaudiocpp @@ -50,8 +50,8 @@ LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)/bin/Project AR := ar rcus CXX := g++ CC := gcc -CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"791\" $(Preprocessors) -CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"791\" $(Preprocessors) +CXXFLAGS := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) -DSVN_REVISION=\"794\" $(Preprocessors) +CFLAGS := -O2 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=no) -DSVN_REVISION=\"794\" $(Preprocessors) ## @@ -62,8 +62,8 @@ WXWIN:=C:\bin\wxWidgets-2.9.4 PATH:=$(WXWIN)\lib\gcc_dll;$(PATH) WXCFG:=gcc_dll\mswu UNIT_TEST_PP_SRC_DIR:=C:\bin\UnitTest++-1.3 -Objects=$(IntermediateDirectory)/src_dlg_about$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_audio$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_comports$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_options$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_main$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot$(ObjectSuffix) $(IntermediateDirectory)/src_topFrame$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix) \ - $(IntermediateDirectory)/src_fdmdv2_pa_wrapper$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_scalar$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(ObjectSuffix) +Objects=$(IntermediateDirectory)/src_dlg_about$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_audio$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_comports$(ObjectSuffix) $(IntermediateDirectory)/src_dlg_options$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_main$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot$(ObjectSuffix) $(IntermediateDirectory)/src_topFrame$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_pa_wrapper$(ObjectSuffix) \ + $(IntermediateDirectory)/src_fdmdv2_plot_scalar$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(ObjectSuffix) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix) ## ## Main Build Targets @@ -78,7 +78,7 @@ $(OutputFile): $(IntermediateDirectory)/.d $(Objects) $(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions) $(IntermediateDirectory)/.d: - @$(MakeDirCommand) "./Debug" + @$(MakeDirCommand) "./Release" PreBuild: @@ -150,14 +150,6 @@ $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(DependSuffix): ../src/fdmdv2_p $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(PreprocessSuffix): ../src/fdmdv2_plot_scatter.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(PreprocessSuffix) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_scatter.cpp" -$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(ObjectSuffix): ../src/fdmdv2_plot_waterfall.cpp $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(DependSuffix) - $(CXX) $(IncludePCH) $(SourceSwitch) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(ObjectSuffix) $(IncludePath) -$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(DependSuffix): ../src/fdmdv2_plot_waterfall.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(ObjectSuffix) -MF$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(DependSuffix) -MM "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall.cpp" - -$(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(PreprocessSuffix): ../src/fdmdv2_plot_waterfall.cpp - @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(PreprocessSuffix) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall.cpp" - $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix): ../src/fdmdv2_plot_spectrum.cpp $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(DependSuffix) $(CXX) $(IncludePCH) $(SourceSwitch) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_spectrum.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix) $(IncludePath) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(DependSuffix): ../src/fdmdv2_plot_spectrum.cpp @@ -190,6 +182,14 @@ $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(DependSuffix): ../src/fdmdv2_hdw_ $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(PreprocessSuffix): ../src/fdmdv2_hdw_ports.cpp @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(PreprocessSuffix) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_hdw_ports.cpp" +$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix): ../src/fdmdv2_plot_waterfall_linux.cpp $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(DependSuffix) + $(CXX) $(IncludePCH) $(SourceSwitch) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp" $(CXXFLAGS) $(ObjectSwitch)$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix) $(IncludePath) +$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(DependSuffix): ../src/fdmdv2_plot_waterfall_linux.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix) -MF$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(DependSuffix) -MM "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp" + +$(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(PreprocessSuffix): ../src/fdmdv2_plot_waterfall_linux.cpp + @$(CXX) $(CXXFLAGS) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(PreprocessSuffix) "C:/bin/Projects/Radio/fdmdv2/src/fdmdv2_plot_waterfall_linux.cpp" + -include $(IntermediateDirectory)/*$(DependSuffix) ## @@ -220,9 +220,6 @@ clean: $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(ObjectSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(DependSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_scatter$(PreprocessSuffix) - $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(ObjectSuffix) - $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(DependSuffix) - $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall$(PreprocessSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(ObjectSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(DependSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_spectrum$(PreprocessSuffix) @@ -235,8 +232,11 @@ clean: $(RM) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(ObjectSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(DependSuffix) $(RM) $(IntermediateDirectory)/src_fdmdv2_hdw_ports$(PreprocessSuffix) + $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(ObjectSuffix) + $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(DependSuffix) + $(RM) $(IntermediateDirectory)/src_fdmdv2_plot_waterfall_linux$(PreprocessSuffix) $(RM) $(OutputFile) $(RM) $(OutputFile).exe - $(RM) "C:\bin\Projects\Radio\fdmdv2\build\.build-debug\fdmdv2" + $(RM) "C:\bin\Projects\Radio\fdmdv2\build\.build-release\fdmdv2" diff --git a/fdmdv2/build/fdmdv2.project b/fdmdv2/build/fdmdv2.project index 62371813..2865c69a 100644 --- a/fdmdv2/build/fdmdv2.project +++ b/fdmdv2/build/fdmdv2.project @@ -16,11 +16,11 @@ - + @@ -57,7 +57,6 @@ - @@ -68,6 +67,7 @@ + diff --git a/fdmdv2/build/fdmdv2.txt b/fdmdv2/build/fdmdv2.txt index 43680006..9dc601be 100644 --- a/fdmdv2/build/fdmdv2.txt +++ b/fdmdv2/build/fdmdv2.txt @@ -1 +1 @@ -./Debug/src_dlg_about.o ./Debug/src_dlg_audio.o ./Debug/src_dlg_comports.o ./Debug/src_dlg_options.o ./Debug/src_fdmdv2_main.o ./Debug/src_fdmdv2_plot.o ./Debug/src_topFrame.o ./Debug/src_fdmdv2_plot_scatter.o ./Debug/src_fdmdv2_plot_waterfall.o ./Debug/src_fdmdv2_plot_spectrum.o ./Debug/src_fdmdv2_pa_wrapper.o ./Debug/src_fdmdv2_plot_scalar.o ./Debug/src_fdmdv2_hdw_ports.o +./Release/src_dlg_about.o ./Release/src_dlg_audio.o ./Release/src_dlg_comports.o ./Release/src_dlg_options.o ./Release/src_fdmdv2_main.o ./Release/src_fdmdv2_plot.o ./Release/src_topFrame.o ./Release/src_fdmdv2_plot_scatter.o ./Release/src_fdmdv2_plot_spectrum.o ./Release/src_fdmdv2_pa_wrapper.o ./Release/src_fdmdv2_plot_scalar.o ./Release/src_fdmdv2_hdw_ports.o ./Release/src_fdmdv2_plot_waterfall_linux.o diff --git a/fdmdv2/build/fdmdv2.workspace b/fdmdv2/build/fdmdv2.workspace index e1c35c73..9d2905da 100644 --- a/fdmdv2/build/fdmdv2.workspace +++ b/fdmdv2/build/fdmdv2.workspace @@ -6,11 +6,11 @@ - + - + diff --git a/fdmdv2/build/fdmdv2_wsp.mk b/fdmdv2/build/fdmdv2_wsp.mk index 4ea617a2..59fb53ea 100644 --- a/fdmdv2/build/fdmdv2_wsp.mk +++ b/fdmdv2/build/fdmdv2_wsp.mk @@ -1,8 +1,8 @@ .PHONY: clean All All: - @echo ----------Building project:[ fdmdv2 - Debug ]---------- + @echo ----------Building project:[ fdmdv2 - Release ]---------- @"$(MAKE)" -f "fdmdv2.mk" clean: - @echo ----------Cleaning project:[ fdmdv2 - Debug ]---------- + @echo ----------Cleaning project:[ fdmdv2 - Release ]---------- @"$(MAKE)" -f "fdmdv2.mk" clean diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 9c8182e2..29af342a 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -106,14 +106,6 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) tools->Append(m_menuItemToolsConfigDelete); - // Add Waterfall Plot window - m_panelWaterfall = new PlotWaterfall((wxFrame*) m_auiNbookCtrl); - m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Waterfall"), true, wxNullBitmap); - - // Add Spectrum Plot window - m_panelSpectrum = new PlotSpectrum((wxFrame*) m_auiNbookCtrl); - m_auiNbookCtrl->AddPage(m_panelSpectrum, _("Spectrum"), true, wxNullBitmap); - wxConfigBase *pConfig = wxConfigBase::Get(); // restore frame position and size @@ -121,9 +113,44 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) int y = pConfig->Read(wxT("/MainFrame/left"), 50); int w = pConfig->Read(wxT("/MainFrame/width"), 650); int h = pConfig->Read(wxT("/MainFrame/height"), 400); + wxGetApp().m_show_wf = pConfig->Read(wxT("/MainFrame/show_wf"), 1); + wxGetApp().m_show_spect = pConfig->Read(wxT("/MainFrame/show_spect"), 1); + wxGetApp().m_show_scatter = pConfig->Read(wxT("/MainFrame/show_scatter"), 1); + wxGetApp().m_show_timing = pConfig->Read(wxT("/MainFrame/show_timing"), 1); + wxGetApp().m_show_freq = pConfig->Read(wxT("/MainFrame/show_freq"), 1); Move(x, y); SetClientSize(w, h); + if(wxGetApp().m_show_wf) + { + // Add Waterfall Plot window + m_panelWaterfall = new PlotWaterfall((wxFrame*) m_auiNbookCtrl); + m_auiNbookCtrl->AddPage(m_panelWaterfall, _("Waterfall"), true, wxNullBitmap); + } + if(wxGetApp().m_show_spect) + { + // Add Spectrum Plot window + m_panelSpectrum = new PlotSpectrum((wxFrame*) m_auiNbookCtrl); + m_auiNbookCtrl->AddPage(m_panelSpectrum, _("Spectrum"), true, wxNullBitmap); + } + if(wxGetApp().m_show_scatter) + { + // Add Scatter Plot window + m_panelScatter = new PlotScatter((wxFrame*) m_auiNbookCtrl); + m_auiNbookCtrl->AddPage(m_panelScatter, _("Scatter"), true, wxNullBitmap); + } + if(wxGetApp().m_show_timing) + { + // Add Timing Offset window + m_panelTimeOffset = new PlotScalar((wxFrame*) m_auiNbookCtrl); + m_auiNbookCtrl->AddPage(m_panelTimeOffset, L"Timing \u0394", true, wxNullBitmap); + } + if(wxGetApp().m_show_freq ) + { + // Add Frequency Offset window + m_panelFreqOffset = new PlotScalar((wxFrame*) m_auiNbookCtrl); + m_auiNbookCtrl->AddPage(m_panelFreqOffset, L"Frequency \u0394", true, wxNullBitmap); + } wxGetApp().m_strRxInAudio = pConfig->Read(wxT("/Audio/RxIn"), wxT("")); wxGetApp().m_strRxOutAudio = pConfig->Read(wxT("/Audio/RxOut"), wxT("")); wxGetApp().m_textVoiceInput = pConfig->Read(wxT("/Audio/TxIn"), wxT("")); @@ -184,22 +211,27 @@ MainFrame::~MainFrame() { GetClientSize(&w, &h); GetPosition(&x, &y); - pConfig->Write(wxT("/MainFrame/top"), (long) x); - pConfig->Write(wxT("/MainFrame/left"), (long) y); - pConfig->Write(wxT("/MainFrame/width"), (long) w); - pConfig->Write(wxT("/MainFrame/height"), (long) h); - - pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio); - pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio); - pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput); - pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput); - pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate); - - pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); - pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); - pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); - pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); - pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); + pConfig->Write(wxT("/MainFrame/top"), (long) x); + pConfig->Write(wxT("/MainFrame/left"), (long) y); + pConfig->Write(wxT("/MainFrame/width"), (long) w); + pConfig->Write(wxT("/MainFrame/height"), (long) h); + pConfig->Write(wxT("/MainFrame/show_wf"), wxGetApp().m_show_wf); + pConfig->Write(wxT("/MainFrame/show_spect"), wxGetApp().m_show_spect); + pConfig->Write(wxT("/MainFrame/show_scatter"), wxGetApp().m_show_scatter); + pConfig->Write(wxT("/MainFrame/show_timing"), wxGetApp().m_show_timing); + pConfig->Write(wxT("/MainFrame/show_freq"), wxGetApp().m_show_freq); + + pConfig->Write(wxT("/Audio/RxIn"), wxGetApp().m_strRxInAudio); + pConfig->Write(wxT("/Audio/RxOut"), wxGetApp().m_strRxOutAudio); + pConfig->Write(wxT("/Audio/TxIn"), wxGetApp().m_textVoiceInput); + pConfig->Write(wxT("/Audio/TxOut"), wxGetApp().m_textVoiceOutput); + pConfig->Write(wxT("/Audio/SampleRate"), wxGetApp().m_strSampleRate); + + pConfig->Write(wxT("/Rig/Port"), wxGetApp().m_strRigCtrlPort); + pConfig->Write(wxT("/Rig/Baud"), wxGetApp().m_strRigCtrlBaud); + pConfig->Write(wxT("/Rig/DataBits"), wxGetApp().m_strRigCtrlDatabits); + pConfig->Write(wxT("/Rig/StopBits"), wxGetApp().m_strRigCtrlStopbits); + pConfig->Write(wxT("/Rig/Parity"), wxGetApp().m_strRigCtrlParity); } m_togRxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this); m_togTxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnTxIDUI), NULL, this); diff --git a/fdmdv2/src/fdmdv2_main.h b/fdmdv2/src/fdmdv2_main.h index 14e6e8ef..101509ba 100644 --- a/fdmdv2/src/fdmdv2_main.h +++ b/fdmdv2/src/fdmdv2_main.h @@ -40,11 +40,11 @@ #include "fdmdv2_plot.h" #include "fdmdv2_plot_scalar.h" #include "fdmdv2_plot_scatter.h" -#ifdef __LINUX__ +//#ifdef __LINUX__ #include "fdmdv2_plot_waterfall_linux.h" -#else -#include "fdmdv2_plot_waterfall.h" -#endif +//#else +//#include "fdmdv2_plot_waterfall.h" +//#endif #include "fdmdv2_plot_spectrum.h" #include "fdmdv2_pa_wrapper.h" #include "sndfile.h" @@ -105,6 +105,11 @@ class MainApp : public wxApp wxString m_strRigCtrlDatabits; wxString m_strRigCtrlStopbits; wxString m_strRigCtrlParity; + int m_show_wf; + int m_show_spect; + int m_show_scatter; + int m_show_timing; + int m_show_freq; wxRect m_rTopWindow; @@ -147,11 +152,11 @@ class MainFrame : public TopFrame MainFrame(wxWindow *parent); virtual ~MainFrame(); -// PlotPanel* m_panelDefaultA; PlotSpectrum* m_panelSpectrum; PlotWaterfall* m_panelWaterfall; PlotScatter* m_panelScatter; - PlotScalar* m_panelScalar; + PlotScalar* m_panelTimeOffset; + PlotScalar* m_panelFreqOffset; bool m_SquelchActive; bool m_RxRunning; bool m_TxRunning; @@ -165,7 +170,6 @@ class MainFrame : public TopFrame PaDeviceIndex m_txDevOut; PaError m_rxErr; PaError m_txErr; -// wxSound *m_sound; #ifdef _USE_TIMER wxTimer m_plotTimer; #endif diff --git a/fdmdv2/src/fdmdv2_plot_scalar.cpp b/fdmdv2/src/fdmdv2_plot_scalar.cpp index edb32212..3f0cc88b 100644 --- a/fdmdv2/src/fdmdv2_plot_scalar.cpp +++ b/fdmdv2/src/fdmdv2_plot_scalar.cpp @@ -41,15 +41,16 @@ END_EVENT_TABLE() //---------------------------------------------------------------- // PlotScalar() //---------------------------------------------------------------- -PlotScalar::PlotScalar(wxFrame* parent, int x_max_, int y_max_): PlotPanel(parent) +//PlotScalar::PlotScalar(wxFrame* parent, int x_max_, int y_max_): PlotPanel(parent) +PlotScalar::PlotScalar(wxFrame* parent): PlotPanel(parent) { int i; //align(FL_ALIGN_TOP); //labelsize(10); - m_x_max = x_max_; - m_y_max = y_max_; +// m_x_max = x_max_; +// m_y_max = y_max_; m_mem = new float[m_x_max]; for(i = 0; i < m_x_max; i++) diff --git a/fdmdv2/src/fdmdv2_plot_scalar.h b/fdmdv2/src/fdmdv2_plot_scalar.h index 493248b4..a49862c8 100644 --- a/fdmdv2/src/fdmdv2_plot_scalar.h +++ b/fdmdv2/src/fdmdv2_plot_scalar.h @@ -36,7 +36,7 @@ class PlotScalar: public PlotPanel public: //PlotScalar(wxFrame* parent, int x, int y, int w, int h, int x_max_, int y_max_, const char name[]); - PlotScalar(wxFrame* parent, int x_max_, int y_max_); + PlotScalar(wxFrame* parent); ~PlotScalar(); void add_new_sample(float sample); diff --git a/fdmdv2/src/fdmdv2_plot_waterfall.cpp b/fdmdv2/src/fdmdv2_plot_waterfall.cpp index 7a9c8c3c..01ea6b0e 100644 --- a/fdmdv2/src/fdmdv2_plot_waterfall.cpp +++ b/fdmdv2/src/fdmdv2_plot_waterfall.cpp @@ -228,10 +228,6 @@ void PlotWaterfall::drawData() //wxMemoryDC& pDC) wxNativePixelData::Iterator rowStart = p; for(int x = 0; x < (w - 1); ++x, ++p) { -// p.Red() = m_pTopFrame->m_rxPa->m_av_mag[x]; -// p.Green() = m_pTopFrame->m_rxPa->m_av_mag[x]; -// p.Blue() = m_pTopFrame->m_rxPa->m_av_mag[x]; - p.Red() = g_avmag[x]; p.Green() = g_avmag[x]; p.Blue() = g_avmag[x]; @@ -339,14 +335,7 @@ void PlotWaterfall::plotPixelData(wxAutoBufferedPaintDC& dc) for(px = 0; px < m_rCtrl.GetWidth(); px++) { index = px * spec_index_per_px; - // intensity = intensity_per_dB * (m_av_mag[index] - MIN_DB); intensity = intensity_per_dB * (g_avmag[index] - MIN_DB); -// intensity = intensity_per_dB * (((MainFrame *)GetParent())->m_rxPa->m_av_mag[index] - MIN_DB); -// intensity = intensity_per_dB * (((MainFrame *)GetParent())->m_av_mag[index] - MIN_DB); - if(intensity > 255) - { - intensity = 255; - } if(intensity > 255) { intensity = 255; diff --git a/fdmdv2/src/topFrame.cpp b/fdmdv2/src/topFrame.cpp index 5e9fdb91..cb6c3b5a 100644 --- a/fdmdv2/src/topFrame.cpp +++ b/fdmdv2/src/topFrame.cpp @@ -162,7 +162,10 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxBoxSizer* upperSizer; upperSizer = new wxBoxSizer(wxVERTICAL); - m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE); + //m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM|wxAUI_NB_DEFAULT_STYLE); + //long style = wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS | wxAUI_NB_CLOSE_ON_ACTIVE_TAB | wxAUI_NB_MIDDLE_CLICK_CLOSE; + long nb_style = wxAUI_NB_BOTTOM | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS; + m_auiNbookCtrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, nb_style); m_auiNbookCtrl->SetFont(wxFont(6, 70, 90, 90, false, wxEmptyString));