File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 // Set your X-PLane install folder to deploy the plugin directly to X-Plane while debugging
3- "xplane.folder" : " /home/andi/.steam/steam/steamapps/common/X-Plane 11"
3+ //"xplane.folder" : "/home/andi/.steam/steam/steamapps/common/X-Plane 11"
4+ "xplane.folder" : " D:\\ SteamLibrary\\ steamapps\\ common\\ X-Plane 11"
45}
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ bool MSP::probeNextPort()
236236 {
237237 return false ;
238238 }
239- std::string connectionString = " \\\\ .\\ COM" + std::to_string (portID);
239+ connectionString = " \\\\ .\\ COM" + std::to_string (portID);
240240#elif LIN
241241 if (this ->probeTtyUSB )
242242 {
@@ -395,7 +395,7 @@ void MSP::decode()
395395 {
396396 this ->lastUpdate = Utils::GetTicks ();
397397 }
398- else if (Utils::GetTicks () > this ->lastUpdate + (Utils::IsDebuggerPresent () ? MSPConstants::MSP_COMM_DEBUG_TIMEOUT_MS : MSPConstants::MSP_COMM_TIMEOUT_MS ))
398+ else if (Utils::GetTicks () > this ->lastUpdate + (Utils::IsDebuggerAttached () ? MSPConstants::MSP_COMM_DEBUG_TIMEOUT_MS : MSPConstants::MSP_COMM_TIMEOUT_MS ))
399399 {
400400 this ->state = STATE_TIMEOUT ;
401401 this ->disconnect ();
Original file line number Diff line number Diff line change 1919#include < dlfcn.h>
2020#include < gtk/gtk.h>
2121#include < arpa/inet.h>
22+ #include < sys/ptrace.h>
2223#endif
2324
2425#if APL
@@ -146,14 +147,16 @@ namespace Utils
146147#endif
147148 }
148149
149- #if LIN || APL
150-
151- static bool IsDebuggerPresent ()
150+ static bool IsDebuggerAttached ()
152151 {
152+ #if LIN || APL
153+ return ptrace (PTRACE_TRACEME , 0 , 1 , 0 ) == -1 ;
154+ #elif IBM
155+ return IsDebuggerPresent ();
156+ #else
153157 return false ;
154- }
155-
156158#endif
159+ }
157160
158161 static uint32_t GetTicks ()
159162 {
Original file line number Diff line number Diff line change @@ -55,15 +55,14 @@ void Serial::OpenConnection(std::string &connectionString)
5555 // Disable software flow control (XON/XOFF)
5656 dcbSerialParams.fOutX = FALSE ;
5757 dcbSerialParams.fInX = FALSE ;
58- OpenConnection
5958 // Disable hardware flow control (RTS/CTS)
6059 dcbSerialParams.fRtsControl = RTS_CONTROL_DISABLE ;
6160 dcbSerialParams.fDtrControl = DTR_CONTROL_DISABLE ;
6261
6362 // Disable any special processing of bytes
6463 dcbSerialParams.fBinary = TRUE ;
6564
66- if (!SetCommState (hSerial, &dcbSerialParams))OpenConnection
65+ if (!SetCommState (hSerial, &dcbSerialParams))
6766 {
6867 throw std::runtime_error (" Could not set Serial Port parameters" );
6968 }
@@ -77,7 +76,7 @@ OpenConnection
7776 comTimeOut.WriteTotalTimeoutConstant = 300 ;
7877 SetCommTimeouts (hSerial, &comTimeOut);
7978
80- this ->connected = true ;OpenConnection
79+ this ->connected = true ;
8180 }
8281 }
8382 }
Original file line number Diff line number Diff line change 44
55#include " SerialBase.h"
66
7- #ifndef SOCKET
7+ #if LIN
88 typedef int SOCKET ;
99#endif
1010
You can’t perform that action at this time.
0 commit comments