git-svn-id: https://svn.code.sf.net/p/freetel/code@1091 01035d8c-6547-0410-b346-abe4f...
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 30 Nov 2012 20:29:40 +0000 (20:29 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 30 Nov 2012 20:29:40 +0000 (20:29 +0000)
fdmdv2/build/fdmdv2.mk
fdmdv2/build/fdmdv2.project
fdmdv2/src/fdmdv2_main.cpp

index 8d3cb934fa03f899a2c37e01edd479ecfa7451d6..be8b3e847d3a928d889d37cba55620433901072b 100644 (file)
@@ -13,7 +13,7 @@ CurrentFileName        :=
 CurrentFilePath        :=\r
 CurrentFileFullPath    :=\r
 User                   :=wittend\r
-Date                   :=11/29/2012\r
+Date                   :=11/30/2012\r
 CodeLitePath           :="D:\bin\CodeLite"\r
 LinkerName             :=g++\r
 SharedObjectLinkerName :=g++ -shared -fPIC\r
@@ -52,8 +52,8 @@ LibPath                := $(LibraryPathSwitch). $(LibraryPathSwitch)d:/Projects/
 AR       := ar rcus\r
 CXX      := g++\r
 CC       := gcc\r
-CXXFLAGS :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1088\"  $(Preprocessors)\r
-CFLAGS   :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1088\"  $(Preprocessors)\r
+CXXFLAGS :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1090\"  $(Preprocessors)\r
+CFLAGS   :=  -g -O0 -Wall $(shell wx-config --cxxflags --unicode=yes --debug=yes)  -DSVN_REVISION=\"1090\"  $(Preprocessors)\r
 \r
 \r
 ##\r
index 0851d9464953b6bb93a783f4f5a59dd1ba813c81..fe4f795beffd47a133d705f26bd9908cb553830a 100644 (file)
@@ -82,7 +82,7 @@
         <Library Value="ctb-0.16.dll"/>
       </Linker>
       <ResourceCompiler Options="$(shell wx-config --rcflags)" Required="no"/>
-      <General OutputFile="$(IntermediateDirectory)/freeDV" IntermediateDirectory="./Debug" Command="./freeDV.exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="yes"/>
+      <General OutputFile="$(IntermediateDirectory)/freeDV" IntermediateDirectory="./Debug" Command="./freeDV.exe" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="$(IntermediateDirectory)" PauseExecWhenProcTerminates="no"/>
       <Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
         <![CDATA[]]>
       </Environment>
index 9abb37567f47136dd596c032b3ac54d1a7eb500e..87bf8daca37d98d403f387a85e324b23f4209055 100644 (file)
@@ -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