diff --git a/TQInterface/TQInterface.cpp b/TQInterface/TQInterface.cpp index 5e772e4..63fe6b9 100644 --- a/TQInterface/TQInterface.cpp +++ b/TQInterface/TQInterface.cpp @@ -252,8 +252,7 @@ void CALLBACK MyDispatchProcTC(SIMCONNECT_RECV* pData, DWORD cbData, void *pCont switch (data->dwRequestID) { case AC_ON_GROUND_REQUEST: { - printf("\nOn ground: %f", &data->dwData); - onGround = (int)&data->dwData; + onGround = (int)((acOnGround *)&data->dwData)->onGround; break; } case AC_DATA_REQUEST: @@ -530,6 +529,10 @@ int __cdecl _tmain(int argc, _TCHAR* argv[]) } // Start TQ throttleControl(); + // Turn off + Sleep(10); + arduino->writeSerialPort("r", 1); + Sleep(10); } return 0; } diff --git a/TQInterface/stdafx.h b/TQInterface/stdafx.h index ae40894..f829fec 100644 --- a/TQInterface/stdafx.h +++ b/TQInterface/stdafx.h @@ -60,6 +60,10 @@ struct aircraftData { double lowerThrottleLimit; }; +struct acOnGround { + double onGround; +}; + // Structs for engines struct engineAll { double throttlePercent;