700B mode integrated and tested OK in loopback
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 10 Aug 2015 11:00:31 +0000 (11:00 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 10 Aug 2015 11:00:31 +0000 (11:00 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2269 01035d8c-6547-0410-b346-abe4f91aad63

fdmdv2-dev/README.txt
fdmdv2-dev/src/fdmdv2_main.cpp
fdmdv2-dev/src/topFrame.cpp
fdmdv2-dev/src/topFrame.h

index f28f20457dece17f8d97163fd7f3e4d088dec7f4..c844400cd0f190f3be9081d14a32cdfc2ab31743 100644 (file)
@@ -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
index 2adec2c605421f84893d01399faa216d07dbacd6..37bf6a429b7fc1d65103eb372c57554f876e7247 100644 (file)
@@ -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);
 
     }
index 54ea80ab8f45cae16e981254319ddd23c2b4288f..e9ca34fd6bfa317589d037a5ada9adcb53b4236c 100644 (file)
@@ -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);
index 43413154fd39ce49c7ed0c70bd0f86af3e4d84d9..54ec4080a7dc6d16bab7ec044df57ee2c0338c41 100644 (file)
@@ -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;