6/ Build All the libraries and FreeDV:
$ cmake -DBOOTSTRAP_WXWIDGETS=TRUE -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-Ubuntu-mingw32.cmake -DUSE_STATIC_PORTAUDIO=TRUE -DUSE_STATIC_SNDFILE=TRUE -DUSE_STATIC_SAMPLERATE=TRUE -DUSE_STATIC_SOX=TRUE -DUSE_STATIC_CODEC2=FALSE -DCODEC2_INCLUDE_DIRS=/home/david/tmp/codec2-dev/src -DCODEC2_LIBRARY=/home/david/tmp/codec2-dev/build_windows/src/libcodec2.dll.a -DHAMLIB_INCLUDE_DIR=hamlib-win32-1.2.15.3/include -DHAMLIB_LIBRARY=hamlib-win32-1.2.15.3/lib/gcc/libhamlib.dll.a ..
+ $ make
====================================
Building and installing on Windows
(function (lambda ()
(setq c-basic-offset 4)
)))
+
====
TODO
====
[X] varicode, codec, modem states
[X] tx and rx freq shifts
[X] generic, mode indep, sync, snr, scatter?
- [ ] text working on 700 and 1600
- [ ] char by char text appearing
+ [X] text working on 700 and 1600
+ [X] char by char text appearing
[ ] add 700 to freedv API
[X] modem signal spectrum and stats consistent with fdmdv
[X] rx from file works
[X] cohpsk snr est
[X] tx works in full duplex
[ ] clipper a check box, so we can see difference in spectrum
+ + adjustable at run time
[ ] analog mode
+ complicated by sample rate change
[ ] squelch
bSizer30->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3);
+ //------------------------------
+ // FreeDV 700 Options
+ //------------------------------
+
+ wxStaticBoxSizer* sbSizer_freedv700;
+ wxStaticBox *sb_freedv700 = new wxStaticBox(this, wxID_ANY, _("FreeDV 700 Clipping"));
+ sbSizer_freedv700 = new wxStaticBoxSizer(sb_freedv700, wxHORIZONTAL);
+
+ m_ckboxFreeDV700txClip = new wxCheckBox(this, wxID_ANY, _("Enable"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
+ m_ckboxFreeDV700txClip->SetToolTip(_("Clip FreeDv 700 tx waveform to reduce Peak to Average Power Ratio (PAPR)"));
+ sbSizer_freedv700->Add(m_ckboxFreeDV700txClip, 0, wxALIGN_LEFT, 0);
+
+ bSizer30->Add(sbSizer_freedv700,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3);
+
//------------------------------
// Txt Msg Text Box
//------------------------------
m_sdbSizer5Cancel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnCancel), NULL, this);
m_sdbSizer5Apply->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnApply), NULL, this);
+ m_ckboxFreeDV700txClip->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxScrollEventHandler(OptionsDlg::OnFreeDV700txClip), NULL, this);
+
event_in_serial = 0;
event_out_serial = 0;
}
m_sdbSizer5OK->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnOK), NULL, this);
m_sdbSizer5Cancel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnCancel), NULL, this);
m_sdbSizer5Apply->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(OptionsDlg::OnApply), NULL, this);
+ m_ckboxFreeDV700txClip->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxScrollEventHandler(OptionsDlg::OnFreeDV700txClip), NULL, this);
}
if (wxGetApp().m_textEncoding == 2)
m_rb_textEncoding2->SetValue(true);
m_ckboxEnableChecksum->SetValue(wxGetApp().m_enable_checksum);
+
+ m_ckboxFreeDV700txClip->SetValue(wxGetApp().m_FreeDV700txClip);
}
if(inout == EXCHANGE_DATA_OUT)
wxGetApp().m_textEncoding = 2;
wxGetApp().m_enable_checksum = m_ckboxEnableChecksum->GetValue();
+ wxGetApp().m_FreeDV700txClip = m_ckboxFreeDV700txClip->GetValue();
+
if (storePersistent) {
pConfig->Write(wxT("/Data/CallSign"), wxGetApp().m_callSign);
pConfig->Write(wxT("/Data/TextEncoding"), wxGetApp().m_textEncoding);
pConfig->Write(wxT("/UDP/enable"), wxGetApp().m_udp_enable);
pConfig->Write(wxT("/UDP/port"), wxGetApp().m_udp_port);
+ pConfig->Write(wxT("/FreeDV700/txClip"), wxGetApp().m_FreeDV700txClip);
+
pConfig->Flush();
}
}
ExchangeData(EXCHANGE_DATA_IN, false);
}
+// immediately change flags rather using ExchangeData() so we can switch on and off at run time
+
+void OptionsDlg::OnFreeDV700txClip(wxScrollEvent& event) {
+ wxGetApp().m_FreeDV700txClip = m_ckboxFreeDV700txClip->GetValue();
+}
+
void OptionsDlg::updateEventLog(wxString event_in, wxString event_out) {
wxString event_in_with_serial, event_out_with_serial;
public:
OptionsDlg( wxWindow* parent,
wxWindowID id = wxID_ANY, const wxString& title = _("Options"),
- const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600,600),
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(600,630),
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~OptionsDlg();
void OnClose(wxCloseEvent& event);
void OnInitDialog(wxInitDialogEvent& event);
+ void OnFreeDV700txClip(wxScrollEvent& event);
+
wxTextCtrl *m_txtCtrlCallSign; // TODO: this should be renamed to tx_txtmsg, and rename all related incl persis strge
wxCheckBox *m_ckboxTestFrame;
wxCheckBox *m_ckboxChannelNoise;
+ wxCheckBox *m_ckboxFreeDV700txClip;
wxRadioButton *m_rb_textEncoding1;
wxRadioButton *m_rb_textEncoding2;
wxGetApp().m_udp_enable = (float)pConfig->Read(wxT("/UDP/enable"), f);
wxGetApp().m_udp_port = (int)pConfig->Read(wxT("/UDP/port"), 3000);
+ wxGetApp().m_FreeDV700txClip = (float)pConfig->Read(wxT("/FreeDV700/txClip"), t);
+
pConfig->SetPath(wxT("/"));
// this->Connect(m_menuItemHelpUpdates->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnHelpCheckUpdatesUI));
pConfig->Write(wxT("/Filter/MicInEQEnable"), wxGetApp().m_MicInEQEnable);
pConfig->Write(wxT("/Filter/SpkOutEQEnable"), wxGetApp().m_SpkOutEQEnable);
+
+ pConfig->Write(wxT("/FreeDV700/txClip"), wxGetApp().m_FreeDV700txClip);
}
//m_togRxID->Disconnect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MainFrame::OnTogBtnRxIDUI), NULL, this);
g_rxUserdata->micInEQEnable = wxGetApp().m_MicInEQEnable;
g_rxUserdata->spkOutEQEnable = wxGetApp().m_SpkOutEQEnable;
+ // Run time update of FreeDV 700 tx clipper
+
+ g_pfreedv->clip = (int)wxGetApp().m_FreeDV700txClip;
+ //fprintf(stderr, "g_pfreedv->clip: %d\n", g_pfreedv->clip);
+
// Test Frame Bit Error Updates ------------------------------------
// Toggle test frame mode at run time
int FilterEvent(wxEvent& event);
MainFrame *frame;
+
+ bool m_FreeDV700txClip;
protected:
};
FIFO *input_fifo // modem samples input to demod
);
+// FreeDv API calls these puppies when it needs/receives a text char
+
char my_get_next_tx_char(void *callback_state);
void my_put_next_rx_char(void *callback_state, char c);