public:
- AudioOptsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,300 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+ AudioOptsDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Audio Config"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,300 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~AudioOptsDialog();
int ExchangeData(int inout);
};
//==========================================================================
// Name: dlg_comports.cpp
-// Purpose: Creates simple wxWidgets dialog GUI to select
-// real/virtual Comm ports.
+// Purpose: Subclasses dialog GUI for PTT Config. Creates simple
+// wxWidgets dialog GUI to select real/virtual Comm ports.
// Date: May 11 2012
// Authors: David Rowe, David Witten
//
wxBoxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(mainSizer);
+ wxStaticBoxSizer* staticBoxSizer28 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("VOX PTT Settings")), wxVERTICAL);
+ m_ckHalfDuplex = new wxCheckBox(this, wxID_ANY, _("Half Duplex"), wxDefaultPosition, wxSize(-1,-1), 0);
+ m_ckHalfDuplex->SetToolTip(_("Should be checked for VOX operated Tx/Rx switching"));
+ staticBoxSizer28->Add(m_ckHalfDuplex, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5);
+ mainSizer->Add(staticBoxSizer28, 0, wxEXPAND, 5);
+
/*
wxStaticBoxSizer* staticBoxSizer28 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Audio Tone")), wxVERTICAL);
mainSizer->Add(staticBoxSizer28, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5);
if(inout == EXCHANGE_DATA_IN)
{
// m_ckUsePTTRtChan->SetValue(wxGetApp().m_boolUseTonePTT);
+ m_ckHalfDuplex->SetValue(wxGetApp().m_boolHalfDuplex);
m_ckUseSerialPTT->SetValue(wxGetApp().m_boolUseSerialPTT);
str = wxGetApp().m_strRigCtrlPort;
#ifdef __WXMSW__
}
if(inout == EXCHANGE_DATA_OUT)
{
+ wxGetApp().m_boolHalfDuplex = m_ckHalfDuplex->GetValue();
wxGetApp().m_boolUseSerialPTT = m_ckUseSerialPTT->IsChecked();
// wxGetApp().m_boolUseTonePTT = m_ckUsePTTRtChan->IsChecked();
#ifdef __WXMSW__
//==========================================================================
-// Name: dlg_options.h
-// Purpose: Subclasses dialog GUI for general program options.
-// (DlgOptions from topFrame.h)
+// Name: dlg_comports.h
+// Purpose: Subclasses dialog GUI for PTT Config.
+//
// Created: May. 11, 2012
// Authors: David Rowe, David Witten
//
class ComPortsDlg : public wxDialog
{
public:
- ComPortsDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hardware PTT"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
+ ComPortsDlg(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("PTT Config"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(450,300), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
virtual ~ComPortsDlg();
void ExchangeData(int inout);
protected:
+ wxCheckBox* m_ckHalfDuplex;
wxCheckBox* m_ckUsePTTRtChan;
wxListBox* m_listCtrlPorts;
wxCheckBox* m_ckUseSerialPTT;
int g_split;
int g_tx;
float g_snr;
+bool g_half_duplex;
// sending and receiving Call Sign data
struct FIFO *g_txDataInFifo;
wxGetApp().m_strRigCtrlStopbits = pConfig->Read(wxT("/Rig/StopBits"), wxT("1"));
wxGetApp().m_strRigCtrlParity = pConfig->Read(wxT("/Rig/Parity"), wxT("n"));
wxGetApp().m_boolUseTonePTT = pConfig->ReadBool(wxT("/Rig/UseTonePTT"), false);
+ wxGetApp().m_boolHalfDuplex = pConfig->ReadBool(wxT("/Rig/HalfDuplex"), true);
wxGetApp().m_boolUseSerialPTT = pConfig->ReadBool(wxT("/Rig/UseSerialPTT"), false);
wxGetApp().m_boolUseRTS = pConfig->ReadBool(wxT("/Rig/UseRTS"), true);
wxGetApp().m_boolRTSPos = pConfig->ReadBool(wxT("/Rig/RTSPolarity"), false);
pConfig->Write(wxT("/Rig/DTRPolarity"), wxGetApp().m_boolDTRPos);
pConfig->Write(wxT("/Rig/UseTonePTT"), wxGetApp().m_boolUseTonePTT);
pConfig->Write(wxT("/Rig/UseSerialPTT"), wxGetApp().m_boolUseSerialPTT);
+ pConfig->Write(wxT("/Rig/HalfDuplex"), wxGetApp().m_boolHalfDuplex);
pConfig->Write(wxT("/File/playFileToMicInPath"), wxGetApp().m_playFileToMicInPath);
pConfig->Write(wxT("/File/recFileFromRadioPath"), wxGetApp().m_recFileFromRadioPath);
g_State = 0;
g_snr = 0.0;
+ g_half_duplex = wxGetApp().m_boolHalfDuplex;
m_pcallsign = m_callsign;
// TX side processing --------------------------------------------
//
- if (g_nSoundCards == 2 ) {
+ if ((g_nSoundCards == 2) && ((g_half_duplex && g_tx) || !g_half_duplex)) {
// Make sure we have at least 6 frames of modulator output
// samples. This also locks the modulator to the sample rate
wxString m_strRigCtrlDatabits;
wxString m_strRigCtrlStopbits;
wxString m_strRigCtrlParity;
+ bool m_boolHalfDuplex;
bool m_boolUseSerialPTT;
bool m_boolUseTonePTT;
bool m_boolUseRTS;