From: deuce Date: Tue, 6 May 2014 04:20:22 +0000 (+0000) Subject: Performs more complete COM port initialization on Win32 to "clear out" settings in... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=0e6891c1f3797423c01248b53e7c26c28ce5cbf2;p=freetel-svn-tracking.git Performs more complete COM port initialization on Win32 to "clear out" settings in the control panel. Should fix the issue reported by WB8ILI if he's using Windows. git-svn-id: https://svn.code.sf.net/p/freetel/code@1591 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index c95ffc69..ebb4c646 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -604,9 +604,20 @@ bool MainFrame::openComPort(const char *name) /* Force N-8-1 mode: */ if(GetCommState(com_handle, &dcb)==TRUE) { - dcb.ByteSize = 8; - dcb.Parity = NOPARITY; - dcb.StopBits = ONESTOPBIT; + dcb.ByteSize = 8; + dcb.Parity = NOPARITY; + dcb.StopBits = ONESTOPBIT; + dcb.DCBlength = sizeof(DCB); + dcb.fBinary = TRUE; + dcb.fOutxCtsFlow = FALSE; + dcb.fOutxDsrFlow = FALSE; + dcb.fDtrControl = DTR_CONTROL_DISABLE; + dcb.fDsrSensitivity = FALSE; + dcb.fTXContinueOnXoff= TRUE; + dcb.fOutX = FALSE; + dcb.fInX = FALSE; + dcb.fRtsControl = RTS_CONTROL_DISABLE; + dcb.fAbortOnError = FALSE; SetCommState(com_handle, &dcb); } }