From: wittend99 Date: Fri, 30 Nov 2012 20:29:40 +0000 (+0000) Subject: git-svn-id: https://svn.code.sf.net/p/freetel/code@1091 01035d8c-6547-0410-b346-abe4f... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=8186d9c0c33e599fc2a550ecaf34ce58aacaf607;p=freetel-svn-tracking.git git-svn-id: https://svn.code.sf.net/p/freetel/code@1091 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/build/fdmdv2.mk b/fdmdv2/build/fdmdv2.mk index 8d3cb934..be8b3e84 100644 --- a/fdmdv2/build/fdmdv2.mk +++ b/fdmdv2/build/fdmdv2.mk @@ -13,7 +13,7 @@ CurrentFileName := CurrentFilePath := CurrentFileFullPath := User :=wittend -Date :=11/29/2012 +Date :=11/30/2012 CodeLitePath :="D:\bin\CodeLite" LinkerName :=g++ SharedObjectLinkerName :=g++ -shared -fPIC @@ -52,8 +52,8 @@ LibPath := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/ AR := ar rcus CXX := g++ CC := gcc -CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1088\" $(Preprocessors) -CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1088\" $(Preprocessors) +CXXFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1090\" $(Preprocessors) +CFLAGS := -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes) -DSVN_REVISION=\"1090\" $(Preprocessors) ## diff --git a/fdmdv2/build/fdmdv2.project b/fdmdv2/build/fdmdv2.project index 0851d946..fe4f795b 100644 --- a/fdmdv2/build/fdmdv2.project +++ b/fdmdv2/build/fdmdv2.project @@ -82,7 +82,7 @@ - + diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index 9abb3756..87bf8dac 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -845,55 +845,53 @@ void MainFrame::OnTogBtnTXClick(wxCommandEvent& event) // on the Tools>PTT configuration page. if(event.IsChecked()) { - if(wxGetApp().m_boolUseRTS) + if(wxGetApp().m_boolUseRTS) // Use RTS { - if(wxGetApp().m_boolRTSPos) + if(wxGetApp().m_boolRTSPos) // RTS asserted HIGH { m_serialPort->SetLineState(ctb::LinestateRts); } - else + else // RTS asserted LOW { m_serialPort->ClrLineState(ctb::LinestateRts); } } - else + else // Use DTR { - if(wxGetApp().m_boolRTSPos) + if(wxGetApp().m_boolDTRPos) // DTR asserted HIGH { - m_serialPort->ClrLineState(ctb::LinestateRts); + m_serialPort->SetLineState(ctb::LinestateDtr); } - else + else // DTR asserted LOW { - m_serialPort->SetLineState(ctb::LinestateRts); + m_serialPort->ClrLineState(ctb::LinestateDtr); } } - // m_btnTogPTT->SetLabel(wxT("PTT")); } - else + else // !isChecked() - so Clear { - if(wxGetApp().m_boolUseDTR) + if(wxGetApp().m_boolUseRTS) // Use RTS { - if(wxGetApp().m_boolDTRPos) + if(wxGetApp().m_boolRTSPos) // RTS cleared LOW { - m_serialPort->SetLineState(ctb::LinestateDtr); + m_serialPort->ClrLineState(ctb::LinestateRts); } - else + else // RTS cleared HIGH { - m_serialPort->ClrLineState(ctb::LinestateDtr); + m_serialPort->SetLineState(ctb::LinestateRts); } } - else + else // Use DTR { - if(wxGetApp().m_boolDTRPos) + if(wxGetApp().m_boolDTRPos) // DTR cleared LOW { m_serialPort->ClrLineState(ctb::LinestateDtr); } - else + else // DTR cleared HIGH { m_serialPort->SetLineState(ctb::LinestateDtr); } } - // m_btnTogPTT->SetLabel(wxT("PTT")); } // reset level gauge @@ -2485,8 +2483,28 @@ void MainFrame::SetupSerialPort(void) if(m_serialPort->Open(wxGetApp().m_strRigCtrlPort.c_str(), baudrate, protocol.c_str(), ctb::SerialPort::NoFlowControl ) >= 0 ) { m_device = m_serialPort; + // always start PTT cleared + if(wxGetApp().m_boolRTSPos) // RTS cleared LOW + { + m_serialPort->ClrLineState(ctb::LinestateRts); + } + else // RTS cleared HIGH + { + m_serialPort->SetLineState(ctb::LinestateRts); + } + if(wxGetApp().m_boolDTRPos) // DTR cleared LOW + { + m_serialPort->ClrLineState(ctb::LinestateDtr); + } + else // DTR cleared HIGH + { + m_serialPort->SetLineState(ctb::LinestateDtr); + } + m_serialPort->ClrLineState(ctb::LinestateRts); + m_serialPort->ClrLineState(ctb::LinestateDtr); + m_btnTogPTT->Enable(true); + m_btnTogPTT->SetValue(false); } - m_btnTogPTT->Enable(true); //m_btnTogPTT->SetLabel(wxT("Rx")); } else