From 0b6dcef034338beeb24cbd64a05f4da96620ee61 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Mon, 10 Aug 2015 11:00:31 +0000 Subject: [PATCH] 700B mode integrated and tested OK in loopback git-svn-id: https://svn.code.sf.net/p/freetel/code@2269 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2-dev/README.txt | 3 ++- fdmdv2-dev/src/fdmdv2_main.cpp | 19 +++++++++++++++---- fdmdv2-dev/src/topFrame.cpp | 2 ++ fdmdv2-dev/src/topFrame.h | 1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/fdmdv2-dev/README.txt b/fdmdv2-dev/README.txt index f28f2045..c844400c 100644 --- a/fdmdv2-dev/README.txt +++ b/fdmdv2-dev/README.txt @@ -10,7 +10,7 @@ missing on many Linux systems, or of the wrong (older) version. 1/ Assuming the fdmdv2-dev source is checked out into ~/fdmdv2-dev: - $ sudo apt-get install libgtk2.0-dev libhamlib-dev libsamplerate-dev libasound2-dev libao-dev + $ sudo apt-get install libgtk2.0-dev libhamlib-dev libsamplerate-dev libasound2-dev libao-dev libgsm1-dev $ cd fdmdv2-dev $ mkdir build_linux $ cd build_linux @@ -193,6 +193,7 @@ TODO + this was 7.5 to 8kHz interpolator bug [X] spectrum and waterfall scale changes when analog pressed [X] ocassional test frames error counter goes crazy + [ ] old Waterfall AGC [ ] 700 syncs up to 1000Hz sine waves + shouldn't trigger sync logic, will be a problem with carriers [ ] "clip" led, encourage people to adjust gain to hit that occ when speaking diff --git a/fdmdv2-dev/src/fdmdv2_main.cpp b/fdmdv2-dev/src/fdmdv2_main.cpp index 2adec2c6..37bf6a42 100644 --- a/fdmdv2-dev/src/fdmdv2_main.cpp +++ b/fdmdv2-dev/src/fdmdv2_main.cpp @@ -425,6 +425,8 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) m_rb1600->SetValue(1); if (mode == 1) m_rb700->SetValue(1); + if (mode == 2) + m_rb700b->SetValue(1); pConfig->SetPath(wxT("/")); @@ -625,6 +627,8 @@ MainFrame::~MainFrame() mode = 0; if (m_rb700->GetValue()) mode = 1; + if (m_rb700b->GetValue()) + mode = 2; pConfig->Write(wxT("/Audio/mode"), mode); } @@ -880,7 +884,7 @@ void MainFrame::OnTimer(wxTimerEvent &evt) m_panelScatter->add_new_samples(&g_stats.rx_symbols[r][0]); } - if (g_pfreedv->mode == FREEDV_MODE_700) { + if ((g_pfreedv->mode == FREEDV_MODE_700) || (g_pfreedv->mode == FREEDV_MODE_700B)) { /* FreeDV 700 uses diversity, so combine symbols for @@ -1188,7 +1192,7 @@ void MainFrame::OnTimer(wxTimerEvent &evt) m_panelTestFrameErrorsHist->add_new_short_samples(0, g_error_hist, 2*FDMDV_NC_MAX, max_hist); } - if (g_pfreedv->mode == FREEDV_MODE_700) { + if ((g_pfreedv->mode == FREEDV_MODE_700) || (g_pfreedv->mode == FREEDV_MODE_700B)) { int c; /* FreeDV 700 mapping from error pattern to bit on each @@ -2105,6 +2109,7 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event) m_rb1600->Disable(); m_rb700->Disable(); + m_rb700b->Disable(); // determine what mode we are using @@ -2118,6 +2123,11 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event) g_Nc = 14; m_panelScatter->setNc(g_Nc/2-1); /* due to diversity, -1 due to no pilot like FreeDV 1600 */ } + if (m_rb700b->GetValue()) { + g_mode = FREEDV_MODE_700B; + g_Nc = 14; + m_panelScatter->setNc(g_Nc/2-1); /* due to diversity, -1 due to no pilot like FreeDV 1600 */ + } // init freedv states @@ -2253,6 +2263,7 @@ void MainFrame::OnTogBtnOnOff(wxCommandEvent& event) m_togBtnOnOff->SetLabel(wxT("Start")); m_rb1600->Enable(); m_rb700->Enable(); + m_rb700b->Enable(); #ifdef DISABLED_FEATURE m_rb1400old->Enable(); m_rb1600Wide->Enable(); @@ -3295,7 +3306,7 @@ void per_frame_rx_processing( if (g_pfreedv->mode == FREEDV_MODE_1600) snr = 2.0; - if (g_pfreedv->mode == FREEDV_MODE_700) + if ((g_pfreedv->mode == FREEDV_MODE_700) || (g_pfreedv->mode == FREEDV_MODE_700)) snr = -1.0; fdmdv_simulate_channel(&g_sig_pwr_av, rx_fdm, nin, snr); } @@ -3320,7 +3331,7 @@ void per_frame_rx_processing( if (g_pfreedv->mode == FREEDV_MODE_1600) fdmdv_get_demod_stats(g_pfreedv->fdmdv, &g_stats); - if (g_pfreedv->mode == FREEDV_MODE_700) + if ((g_pfreedv->mode == FREEDV_MODE_700) || (g_pfreedv->mode == FREEDV_MODE_700B)) cohpsk_get_demod_stats(g_pfreedv->cohpsk, &g_stats); } diff --git a/fdmdv2-dev/src/topFrame.cpp b/fdmdv2-dev/src/topFrame.cpp index 54ea80ab..e9ca34fd 100644 --- a/fdmdv2-dev/src/topFrame.cpp +++ b/fdmdv2-dev/src/topFrame.cpp @@ -308,6 +308,8 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const #endif m_rb700 = new wxRadioButton( this, wxID_ANY, wxT("700"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP); sbSizer_mode->Add(m_rb700, 0, wxALIGN_LEFT|wxALL, 1); + m_rb700b = new wxRadioButton( this, wxID_ANY, wxT("700B"), wxDefaultPosition, wxDefaultSize, 0); + sbSizer_mode->Add(m_rb700b, 0, wxALIGN_LEFT|wxALL, 1); m_rb1600 = new wxRadioButton( this, wxID_ANY, wxT("1600"), wxDefaultPosition, wxDefaultSize, 0); sbSizer_mode->Add(m_rb1600, 0, wxALIGN_LEFT|wxALL, 1); m_rb1600->SetValue(true); diff --git a/fdmdv2-dev/src/topFrame.h b/fdmdv2-dev/src/topFrame.h index 43413154..54ec4080 100644 --- a/fdmdv2-dev/src/topFrame.h +++ b/fdmdv2-dev/src/topFrame.h @@ -107,6 +107,7 @@ class TopFrame : public wxFrame wxRadioButton *m_rb1400old; wxRadioButton *m_rb1400; wxRadioButton *m_rb700; + wxRadioButton *m_rb700b; wxRadioButton *m_rb1600; wxRadioButton *m_rb2000; wxRadioButton *m_rb1600Wide; -- 2.25.1