From 8d85ec4d3107c4c9868c12cc04fbc518e5fede17 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:54:06 +0200 Subject: simconnect: we can make qlibrary non-static, no crashes --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 2 -- ftnoir_protocol_sc/ftnoir_protocol_sc.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 465d8d20..d6df58f0 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -29,8 +29,6 @@ #include "ftnoir_protocol_sc.h" #include "opentrack/plugin-api.hpp" -static QLibrary SCClientLib; - FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr) { } diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index b65bac85..cc41af0e 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -126,6 +126,7 @@ private: HANDLE hSimConnect; // Handle to SimConnect static void CALLBACK processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext); settings s; + QLibrary SCClientLib; }; class SCControls: public IProtocolDialog -- cgit v1.2.3 From 6468223986ede1b1b64581dd37fed11724788a2b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:54:59 +0200 Subject: libs: validate protocol first before starting tracker --- opentrack/selected-libraries.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/opentrack/selected-libraries.cpp b/opentrack/selected-libraries.cpp index 8cb226c8..7617ce90 100644 --- a/opentrack/selected-libraries.cpp +++ b/opentrack/selected-libraries.cpp @@ -20,19 +20,27 @@ SelectedLibraries::SelectedLibraries(QFrame* frame, dylibptr t, dylibptr p, dyli pProtocol(nullptr), correct(false) { - pTracker = make_instance(t); pProtocol = make_instance(p); - pFilter = make_instance(f); - if (!pTracker || !pProtocol) + if (!pProtocol) { - qDebug() << "dylib load failure"; + qDebug() << "protocol dylib load failure"; return; } if(!pProtocol->correct()) { qDebug() << "protocol load failure"; + pProtocol = nullptr; + return; + } + + pTracker = make_instance(t); + pFilter = make_instance(f); + + if (!pTracker) + { + qDebug() << "tracker dylib load failure"; return; } -- cgit v1.2.3 From a474a67b4b4af477be3d4497dfb128546c8261f3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:55:16 +0200 Subject: simconnect: use affinity --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index d6df58f0..f545e89b 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -28,6 +28,7 @@ ********************************************************************************/ #include "ftnoir_protocol_sc.h" #include "opentrack/plugin-api.hpp" +#include "opentrack/thread.hpp" FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr) { @@ -41,6 +42,8 @@ FTNoIR_Protocol::~FTNoIR_Protocol() void FTNoIR_Protocol::run() { + Affinity thr; + if (!SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) return; #if 0 -- cgit v1.2.3 From e472979255f531d95e806a7d55a75ea3f222a88b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:55:36 +0200 Subject: simconnect: don't hook on too many events --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index f545e89b..762afbfa 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -46,14 +46,13 @@ void FTNoIR_Protocol::run() if (!SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) return; -#if 0 - simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame"); - simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); - simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); - simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST); -#endif - + simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame"); + + //simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); + //simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); + //simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST_MASKABLE); + while (!should_stop) { (void) (simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this))); -- cgit v1.2.3 From 5eb808e133282ac0374a8ec2d9bd8451d983b009 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:55:53 +0200 Subject: sc: oops, actctx always failed --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 762afbfa..9cb15752 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -76,7 +76,7 @@ void FTNoIR_Protocol::pose( const double *headpose ) { class ActivationContext { public: - ActivationContext(const int resid) :ok (false) { + ActivationContext(const int resid) : ok(false) { hactctx = INVALID_HANDLE_VALUE; actctx_cookie = 0; ACTCTXA actx = {0}; @@ -99,6 +99,8 @@ public: ReleaseActCtx(hactctx); hactctx = INVALID_HANDLE_VALUE; } + else + ok = true; } else { qDebug() << "SC: can't create win32 activation context" << GetLastError(); } -- cgit v1.2.3 From 56ee1d86556eb39383676fe2dd0bf8dd83d48a97 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 18:55:59 +0200 Subject: sc: yaw was flipped --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 9cb15752..1735305c 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -64,7 +64,7 @@ void FTNoIR_Protocol::run() void FTNoIR_Protocol::pose( const double *headpose ) { virtSCRotX = -headpose[Pitch]; // degrees - virtSCRotY = -headpose[Yaw]; + virtSCRotY = headpose[Yaw]; virtSCRotZ = headpose[Roll]; virtSCPosX = headpose[TX]/100.f; // cm to meters -- cgit v1.2.3 From 66fbdecd8aec780f2dbce6576c3df090aaf916dd Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 19:05:15 +0200 Subject: simconnect: nix enums --- ftnoir_protocol_sc/ftnoir_protocol_sc.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index cc41af0e..e0fb7574 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -58,24 +58,6 @@ typedef HRESULT (WINAPI *importSimConnect_MapClientEventToSimEvent)(HANDLE hSimC typedef HRESULT (WINAPI *importSimConnect_AddClientEventToNotificationGroup)(HANDLE hSimConnect, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, SIMCONNECT_CLIENT_EVENT_ID EventID, BOOL bMaskable); typedef HRESULT (WINAPI *importSimConnect_SetNotificationGroupPriority)(HANDLE hSimConnect, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, DWORD uPriority); -#define SC_CLIENT_FILENAME "SimConnect.dll" - -enum GROUP_ID -{ - GROUP0=0, -}; - -enum EVENT_ID -{ - EVENT_PING=0, - EVENT_INIT, -}; - -enum INPUT_ID -{ - INPUT0=0, -}; - struct settings : opts { value sxs_manifest; settings() : -- cgit v1.2.3 From 2bcab030f7640387e015f232df6254e1806aa586 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 Jul 2015 19:05:29 +0200 Subject: simconnect: allow operating after restarting fsx --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 1735305c..eb8d1a79 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -44,22 +44,24 @@ void FTNoIR_Protocol::run() { Affinity thr; - if (!SUCCEEDED(simconnect_open(&hSimConnect, "FaceTrackNoIR", NULL, 0, 0, 0))) - return; + while (!should_stop) + { + if (SUCCEEDED(simconnect_open(&hSimConnect, "opentrack", NULL, 0, 0, 0))) + { + simconnect_subscribetosystemevent(hSimConnect, 0, "Frame"); - simconnect_subscribetosystemevent(hSimConnect, EVENT_PING, "Frame"); + while (!should_stop) + { + if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this)))) + break; + Sleep(1); + } - //simconnect_mapclienteventtosimevent(hSimConnect, EVENT_INIT, ""); - //simconnect_addclienteventtonotificationgroup(hSimConnect, GROUP0, EVENT_INIT, false); - //simconnect_setnotificationgrouppriority(hSimConnect, GROUP0, SIMCONNECT_GROUP_PRIORITY_HIGHEST_MASKABLE); + (void) simconnect_close(hSimConnect); + } - while (!should_stop) - { - (void) (simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this))); - Sleep(1); + Sleep(100); } - - (void) simconnect_close(hSimConnect); } void FTNoIR_Protocol::pose( const double *headpose ) { -- cgit v1.2.3 From d2076ff5deb2046d1f8bcd2d324e5cd917c3871d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 07:11:24 +0200 Subject: simconnect: increase timer precision just to be safe --- CMakeLists.txt | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c45163dc..448375f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,7 +304,7 @@ endif() if(SDK_SIMCONNECT) opentrack_library(opentrack-proto-simconnect ftnoir_protocol_sc) - target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib) + target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib winmm) include_directories(opentrack-proto-simconnect SYSTEM PUBLIC ${SDK_SIMCONNECT}/inc) endif() diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index eb8d1a79..f767d232 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -44,6 +44,8 @@ void FTNoIR_Protocol::run() { Affinity thr; + (void) timeBeginPeriod(1); + while (!should_stop) { if (SUCCEEDED(simconnect_open(&hSimConnect, "opentrack", NULL, 0, 0, 0))) @@ -54,7 +56,7 @@ void FTNoIR_Protocol::run() { if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this)))) break; - Sleep(1); + Sleep(3); } (void) simconnect_close(hSimConnect); @@ -62,6 +64,8 @@ void FTNoIR_Protocol::run() Sleep(100); } + + (void) timeEndPeriod(1); } void FTNoIR_Protocol::pose( const double *headpose ) { -- cgit v1.2.3 From e21853bff477cd90c5c60ba1a4ef9304df7538fe Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 07:11:43 +0200 Subject: simconnect: don't sleep while exiting --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index f767d232..30590715 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -62,7 +62,8 @@ void FTNoIR_Protocol::run() (void) simconnect_close(hSimConnect); } - Sleep(100); + if (!should_stop) + Sleep(100); } (void) timeEndPeriod(1); -- cgit v1.2.3 From 555d0555e990a99c2061570dcebd0d868f1334b8 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 07:19:21 +0200 Subject: simconnect: get rid of redundant logic --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 40 +------------------------------ ftnoir_protocol_sc/ftnoir_protocol_sc.h | 14 ----------- 2 files changed, 1 insertion(+), 53 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 30590715..c9b0541a 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -144,9 +144,6 @@ bool FTNoIR_Protocol::correct() return false; } - // - // Get the functions from the DLL. - // simconnect_open = (importSimConnect_Open) SCClientLib.resolve("SimConnect_Open"); if (simconnect_open == NULL) { qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_Open function not found in DLL!"; @@ -163,8 +160,6 @@ bool FTNoIR_Protocol::correct() return false; } - //return true; - simconnect_calldispatch = (importSimConnect_CallDispatch) SCClientLib.resolve("SimConnect_CallDispatch"); if (simconnect_calldispatch == NULL) { qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_CallDispatch function not found in DLL!"; @@ -177,24 +172,6 @@ bool FTNoIR_Protocol::correct() return false; } - simconnect_mapclienteventtosimevent = (importSimConnect_MapClientEventToSimEvent) SCClientLib.resolve("SimConnect_MapClientEventToSimEvent"); - if (simconnect_subscribetosystemevent == NULL) { - qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_MapClientEventToSimEvent function not found in DLL!"; - return false; - } - - simconnect_addclienteventtonotificationgroup = (importSimConnect_AddClientEventToNotificationGroup) SCClientLib.resolve("SimConnect_AddClientEventToNotificationGroup"); - if (simconnect_subscribetosystemevent == NULL) { - qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_AddClientEventToNotificationGroup function not found in DLL!"; - return false; - } - - simconnect_setnotificationgrouppriority = (importSimConnect_SetNotificationGroupPriority) SCClientLib.resolve("SimConnect_SetNotificationGroupPriority"); - if (simconnect_subscribetosystemevent == NULL) { - qDebug() << "FTNoIR_Protocol::correct() says: SimConnect_SetNotificationGroupPriority function not found in DLL!"; - return false; - } - qDebug() << "FTNoIR_Protocol::correct() says: SimConnect functions resolved in DLL!"; start(); @@ -204,22 +181,7 @@ bool FTNoIR_Protocol::correct() void FTNoIR_Protocol::handle() { - if (prevSCPosX != virtSCPosX || - prevSCPosY != virtSCPosY || - prevSCPosZ != virtSCPosZ || - prevSCRotX != virtSCRotX || - prevSCRotY != virtSCRotY || - prevSCRotZ != virtSCRotZ) - { - (void) simconnect_set6DOF(hSimConnect, virtSCPosX, virtSCPosY, virtSCPosZ, virtSCRotX, virtSCRotZ, virtSCRotY); - } - - prevSCPosX = virtSCPosX; - prevSCPosY = virtSCPosY; - prevSCPosZ = virtSCPosZ; - prevSCRotX = virtSCRotX; - prevSCRotY = virtSCRotY; - prevSCRotZ = virtSCRotZ; + (void) simconnect_set6DOF(hSimConnect, virtSCPosX, virtSCPosY, virtSCPosZ, virtSCRotX, virtSCRotZ, virtSCRotY); } void CALLBACK FTNoIR_Protocol::processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD, void *self_) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.h b/ftnoir_protocol_sc/ftnoir_protocol_sc.h index e0fb7574..7c32d014 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.h +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.h @@ -54,9 +54,6 @@ typedef HRESULT (WINAPI *importSimConnect_Close)(HANDLE hSimConnect); typedef HRESULT (WINAPI *importSimConnect_CameraSetRelative6DOF)(HANDLE hSimConnect, float fDeltaX, float fDeltaY, float fDeltaZ, float fPitchDeg, float fBankDeg, float fHeadingDeg); typedef HRESULT (WINAPI *importSimConnect_CallDispatch)(HANDLE hSimConnect, DispatchProc pfcnDispatch, void * pContext); typedef HRESULT (WINAPI *importSimConnect_SubscribeToSystemEvent)(HANDLE hSimConnect, SIMCONNECT_CLIENT_EVENT_ID EventID, const char * SystemEventName); -typedef HRESULT (WINAPI *importSimConnect_MapClientEventToSimEvent)(HANDLE hSimConnect, SIMCONNECT_CLIENT_EVENT_ID EventID, const char * EventName); -typedef HRESULT (WINAPI *importSimConnect_AddClientEventToNotificationGroup)(HANDLE hSimConnect, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, SIMCONNECT_CLIENT_EVENT_ID EventID, BOOL bMaskable); -typedef HRESULT (WINAPI *importSimConnect_SetNotificationGroupPriority)(HANDLE hSimConnect, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, DWORD uPriority); struct settings : opts { value sxs_manifest; @@ -88,22 +85,11 @@ private: volatile float virtSCRotY; volatile float virtSCRotZ; - float prevSCPosX; - float prevSCPosY; - float prevSCPosZ; - - float prevSCRotX; - float prevSCRotY; - float prevSCRotZ; - importSimConnect_Open simconnect_open; // SimConnect function(s) in DLL importSimConnect_Close simconnect_close; importSimConnect_CameraSetRelative6DOF simconnect_set6DOF; importSimConnect_CallDispatch simconnect_calldispatch; importSimConnect_SubscribeToSystemEvent simconnect_subscribetosystemevent; - importSimConnect_MapClientEventToSimEvent simconnect_mapclienteventtosimevent; - importSimConnect_AddClientEventToNotificationGroup simconnect_addclienteventtonotificationgroup; - importSimConnect_SetNotificationGroupPriority simconnect_setnotificationgrouppriority; HANDLE hSimConnect; // Handle to SimConnect static void CALLBACK processNextSimconnectEvent(SIMCONNECT_RECV* pData, DWORD cbData, void *pContext); -- cgit v1.2.3 From 68c8278b25b417c21dfbb0e3974044a36dfc151e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 08:31:48 +0200 Subject: simconnect: don't set affinity, only meant for trackers --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index c9b0541a..c0e2fc02 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -28,7 +28,6 @@ ********************************************************************************/ #include "ftnoir_protocol_sc.h" #include "opentrack/plugin-api.hpp" -#include "opentrack/thread.hpp" FTNoIR_Protocol::FTNoIR_Protocol() : should_stop(false), hSimConnect(nullptr) { @@ -42,8 +41,6 @@ FTNoIR_Protocol::~FTNoIR_Protocol() void FTNoIR_Protocol::run() { - Affinity thr; - (void) timeBeginPeriod(1); while (!should_stop) @@ -56,7 +53,7 @@ void FTNoIR_Protocol::run() { if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this)))) break; - Sleep(3); + Sleep(16); } (void) simconnect_close(hSimConnect); -- cgit v1.2.3 From 1388d95ecf71d517d24ccb6713641220a5553e4a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 09:09:18 +0200 Subject: simconnect: use event handle without calldispatch in a loop We aren't supposed to calldispatch in a loop, since it locks up FSX. Use calldispatch only if FSX signals us that an event has been received. This might fix slowness reported in #174. --- CMakeLists.txt | 2 +- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 448375f3..c45163dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -304,7 +304,7 @@ endif() if(SDK_SIMCONNECT) opentrack_library(opentrack-proto-simconnect ftnoir_protocol_sc) - target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib winmm) + target_link_libraries(opentrack-proto-simconnect ${SDK_SIMCONNECT}/lib/SimConnect.lib) include_directories(opentrack-proto-simconnect SYSTEM PUBLIC ${SDK_SIMCONNECT}/inc) endif() diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index c0e2fc02..5f70b093 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -41,19 +41,27 @@ FTNoIR_Protocol::~FTNoIR_Protocol() void FTNoIR_Protocol::run() { - (void) timeBeginPeriod(1); + HANDLE event = CreateEvent(NULL, FALSE, FALSE, nullptr); + + if (event == nullptr) + { + qDebug() << "simconnect: event create" << GetLastError(); + return; + } while (!should_stop) { - if (SUCCEEDED(simconnect_open(&hSimConnect, "opentrack", NULL, 0, 0, 0))) + if (SUCCEEDED(simconnect_open(&hSimConnect, "opentrack", NULL, 0, event, 0))) { simconnect_subscribetosystemevent(hSimConnect, 0, "Frame"); while (!should_stop) { - if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this)))) - break; - Sleep(16); + if (WaitForSingleObject(event, 10) == WAIT_OBJECT_0) + { + if (FAILED(simconnect_calldispatch(hSimConnect, processNextSimconnectEvent, reinterpret_cast(this)))) + break; + } } (void) simconnect_close(hSimConnect); @@ -63,7 +71,7 @@ void FTNoIR_Protocol::run() Sleep(100); } - (void) timeEndPeriod(1); + CloseHandle(event); } void FTNoIR_Protocol::pose( const double *headpose ) { @@ -169,8 +177,6 @@ bool FTNoIR_Protocol::correct() return false; } - qDebug() << "FTNoIR_Protocol::correct() says: SimConnect functions resolved in DLL!"; - start(); return true; -- cgit v1.2.3 From e3140d0293de8adb584dafe264f5f4024c82ff88 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 09:14:12 +0200 Subject: simconnect: guard GNUC pragma --- ftnoir_protocol_sc/ftnoir_protocol_sc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp index 5f70b093..7d4e09f9 100644 --- a/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp +++ b/ftnoir_protocol_sc/ftnoir_protocol_sc.cpp @@ -84,7 +84,9 @@ void FTNoIR_Protocol::pose( const double *headpose ) { virtSCPosZ = -headpose[TZ]/100.f; } -#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#ifdef __GNUC__ +# pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif class ActivationContext { public: -- cgit v1.2.3 From 6b1e8a3c434e9692257f21801c332a30dc2d5d48 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 10:01:01 +0200 Subject: prevent redefinition error by qt moc --- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 3 +-- opentrack/camera-names.hpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index e96e7171..4d55a422 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -12,6 +12,7 @@ #include #include #include "opentrack/thread.hpp" +#include "opentrack/camera-names.hpp" using namespace std; using namespace cv; @@ -129,8 +130,6 @@ void Tracker_PT::run() qDebug()<<"Tracker:: Thread stopping"; } -int camera_name_to_index(const QString &name); - void Tracker_PT::apply_settings() { qDebug()<<"Tracker:: Applying settings"; diff --git a/opentrack/camera-names.hpp b/opentrack/camera-names.hpp index 3d3948fa..6f82ba34 100644 --- a/opentrack/camera-names.hpp +++ b/opentrack/camera-names.hpp @@ -13,6 +13,7 @@ # include #endif +template QList get_camera_names() { QList ret; #if defined(_WIN32) @@ -82,6 +83,7 @@ QList get_camera_names() { return ret; } +template int camera_name_to_index(const QString &name) { auto list = get_camera_names(); -- cgit v1.2.3 From 81d2ffa8b95f0dce0a89784d08fe3ba9501cca1e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 10:01:13 +0200 Subject: initial camera-settings class --- opentrack/opencv-camera-dialog.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 opentrack/opencv-camera-dialog.hpp diff --git a/opentrack/opencv-camera-dialog.hpp b/opentrack/opencv-camera-dialog.hpp new file mode 100644 index 00000000..3b700a70 --- /dev/null +++ b/opentrack/opencv-camera-dialog.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include "opentrack/camera-names.hpp" + +template +class camera_dialog +{ + cv::VideoCapture fake_capture; +public: + void open_camera_settings(cv::VideoCapture* cap, const QString& camera_name, QMutex* camera_mtx) + { + if (cap) + { + QMutexLocker l(camera_mtx); + + if (cap->isOpened()) + { + cap->set(cv::CAP_PROP_SETTINGS, 1); + return; + } + } + + fake_capture = cv::VideoCapture(camera_name_to_index(camera_name)); + fake_capture.set(cv::CAP_PROP_SETTINGS, 1); + // don't hog the camera capture + fake_capture.open(""); + } +}; + -- cgit v1.2.3 From 2e7407a094c74b629cbe8348e9007c6373e476fe Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 10:01:24 +0200 Subject: aruco: use camera settings class --- ftnoir_tracker_aruco/aruco-trackercontrols.ui | 88 ++++++++++++++++----------- ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 43 ++++++++----- ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 10 ++- 3 files changed, 88 insertions(+), 53 deletions(-) diff --git a/ftnoir_tracker_aruco/aruco-trackercontrols.ui b/ftnoir_tracker_aruco/aruco-trackercontrols.ui index 15184c41..4433c47c 100644 --- a/ftnoir_tracker_aruco/aruco-trackercontrols.ui +++ b/ftnoir_tracker_aruco/aruco-trackercontrols.ui @@ -9,8 +9,8 @@ 0 0 - 562 - 178 + 586 + 202 @@ -62,6 +62,43 @@ + + + + + 0 + 0 + + + + + 640x480 + + + + + 320x240 + + + + + 320x200 + + + + + Default (not recommended!) + + + + + + + + Camera name + + + @@ -111,50 +148,27 @@ - - + + 0 0 - - - 640x480 - - - - - 320x240 - - - - - 320x200 - - - - - Default (not recommended!) - - - - + + - Camera name + Camera settings - - - - - 0 - 0 - + + + + Open @@ -174,7 +188,7 @@ - + 0 0 @@ -190,7 +204,7 @@ - + 0 0 @@ -206,7 +220,7 @@ - + 0 0 diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index ca8cea9e..70af379d 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -101,26 +101,31 @@ void Tracker::run() fps = 200; break; } - camera = cv::VideoCapture(camera_name_to_index(s.camera_name)); - if (res.width) + { - camera.set(cv::CAP_PROP_FRAME_WIDTH, res.width); - camera.set(cv::CAP_PROP_FRAME_HEIGHT, res.height); + QMutexLocker l(&camera_mtx); + + camera = cv::VideoCapture(camera_name_to_index(s.camera_name)); + if (res.width) + { + camera.set(cv::CAP_PROP_FRAME_WIDTH, res.width); + camera.set(cv::CAP_PROP_FRAME_HEIGHT, res.height); + } + if (fps) + camera.set(cv::CAP_PROP_FPS, fps); + + if (!camera.isOpened()) + { + qDebug() << "aruco tracker: can't open camera"; + return; + } } - if (fps) - camera.set(cv::CAP_PROP_FPS, fps); aruco::MarkerDetector detector; detector.setDesiredSpeed(3); cv::Rect last_roi(65535, 65535, 0, 0); - if (!camera.isOpened()) - { - fprintf(stderr, "aruco tracker: can't open camera\n"); - return; - } - auto freq = cv::getTickFrequency(); auto last_time = cv::getTickCount(); double cur_fps = 0; @@ -133,8 +138,12 @@ void Tracker::run() while (!stop) { cv::Mat color; - if (!camera.read(color)) - continue; + { + QMutexLocker l(&camera_mtx); + + if (!camera.read(color)) + continue; + } cv::Mat grayscale; cv::cvtColor(color, grayscale, cv::COLOR_RGB2GRAY); @@ -391,6 +400,7 @@ TrackerControls::TrackerControls() connect(ui.btn_calibrate, SIGNAL(clicked()), this, SLOT(toggleCalibrate())); connect(this, SIGNAL(destroyed()), this, SLOT(cleanupCalib())); connect(&calib_timer, SIGNAL(timeout()), this, SLOT(update_tracker_calibration())); + connect(ui.camera_settings, SIGNAL(pressed()), this, SLOT(camera_settings())); } void TrackerControls::toggleCalibrate() @@ -440,3 +450,8 @@ void TrackerControls::doCancel() s.b->reload(); this->close(); } + +void TrackerControls::camera_settings() +{ + open_camera_settings(tracker ? &tracker->camera : nullptr, s.camera_name, tracker ? &tracker->camera_mtx : nullptr); +} diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 875a9d41..297fecdb 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -18,6 +18,7 @@ #include "opentrack/options.hpp" #include "ftnoir_tracker_aruco/trans_calib.h" #include "opentrack/plugin-api.hpp" +#include "opentrack/opencv-camera-dialog.hpp" #include #include @@ -40,9 +41,12 @@ struct settings : opts { {} }; +class TrackerControls; + class Tracker : protected QThread, public ITracker { Q_OBJECT + friend class TrackerControls; static constexpr double c_search_window = 2.65; public: Tracker(); @@ -52,6 +56,8 @@ public: void run(); void getRT(cv::Matx33d &r, cv::Vec3d &t); private: + cv::VideoCapture camera; + QMutex camera_mtx; QMutex mtx; volatile bool stop; QHBoxLayout* layout; @@ -59,12 +65,11 @@ private: settings s; double pose[6]; cv::Mat frame; - cv::VideoCapture camera; cv::Matx33d r; cv::Vec3d t; }; -class TrackerControls : public ITrackerDialog +class TrackerControls : public ITrackerDialog, protected camera_dialog { Q_OBJECT public: @@ -83,4 +88,5 @@ private slots: void toggleCalibrate(); void cleanupCalib(); void update_tracker_calibration(); + void camera_settings(); }; -- cgit v1.2.3 From faab09446c5c26b96e59218abc34b1dc24727418 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 10:20:51 +0200 Subject: pt: initial camera dialog --- ftnoir_tracker_pt/FTNoIR_PT_Controls.ui | 198 ++++++++++++++----------- ftnoir_tracker_pt/camera.h | 3 +- ftnoir_tracker_pt/ftnoir_tracker_pt.cpp | 8 +- ftnoir_tracker_pt/ftnoir_tracker_pt.h | 6 + ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp | 6 + ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h | 4 +- 6 files changed, 133 insertions(+), 92 deletions(-) diff --git a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui index 17e2819b..3e900e8e 100644 --- a/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui +++ b/ftnoir_tracker_pt/FTNoIR_PT_Controls.ui @@ -9,8 +9,8 @@ 0 0 - 397 - 588 + 405 + 593 @@ -67,21 +67,8 @@ Camera settings - - - - - 0 - 0 - - - - Height - - - - - + + 0 @@ -89,15 +76,15 @@ - Device + FPS - camdevice_combo + fps_spin - - + + 0 @@ -105,7 +92,7 @@ - Desired capture width + Desired capture height px @@ -118,16 +105,16 @@ - - + + - + 0 0 - - 10 + + Field of view @@ -144,30 +131,31 @@ - - - - - 0 - 0 - + + + + ° - - Desired capture height + + - - px + + 10 - 2000 + 90 - - 10 + + + + + + - - + + 0 @@ -175,28 +163,51 @@ - FPS + Dynamic pose resolution - - fps_spin + + + + + + Dynamic pose timeout - - + + - + 0 0 - - Field of view + + Desired capture framerate + + + Hz + + + 2000 - - + + + + ms + + + 1 + + + 10000 + + + + + 0 @@ -204,69 +215,78 @@ - Dynamic pose resolution + Height - - - - + + + + + 0 + 0 + + + + Desired capture width - - - - - ° + px - - + + 2000 - + 10 - - 90 - - - + + 0 0 - - Desired capture framerate + + 10 - - Hz + + + + + + + 0 + 0 + - - 2000 + + Device + + + camdevice_combo - - + + - Dynamic pose timeout + Camera settings dialog - - - - ms - - - 1 + + + + + 0 + 0 + - - 10000 + + Open diff --git a/ftnoir_tracker_pt/camera.h b/ftnoir_tracker_pt/camera.h index bffd19ee..63614ded 100644 --- a/ftnoir_tracker_pt/camera.h +++ b/ftnoir_tracker_pt/camera.h @@ -89,12 +89,13 @@ public: void start() override; void stop() override; + operator cv::VideoCapture&() { return *cap; } + protected: bool _get_frame(cv::Mat* frame) override; void _set_fps() override; void _set_res() override; void _set_device_index() override; - private: cv::VideoCapture* cap; }; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp index 4d55a422..dc0659e5 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp @@ -74,7 +74,12 @@ void Tracker_PT::run() const double dt = time.elapsed() * 1e-9; time.start(); cv::Mat frame; - const bool new_frame = camera.get_frame(dt, &frame); + bool new_frame; + + { + QMutexLocker l(&camera_mtx); + new_frame = camera.get_frame(dt, &frame); + } if (new_frame && !frame.empty()) { @@ -133,6 +138,7 @@ void Tracker_PT::run() void Tracker_PT::apply_settings() { qDebug()<<"Tracker:: Applying settings"; + QMutexLocker l(&camera_mtx); QMutexLocker lock(&mutex); camera.set_device_index(camera_name_to_index(s.camera_name)); camera.set_res(s.cam_res_x, s.cam_res_y); diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h index 3b9f1648..d0764933 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h @@ -17,6 +17,7 @@ #include "point_tracker.h" #include "pt_video_widget.h" #include "opentrack/timer.hpp" +#include "opentrack/opencv-camera-dialog.hpp" #include #include @@ -30,11 +31,15 @@ #endif #include +class TrackerDialog_PT; + //----------------------------------------------------------------------------- // Constantly processes the tracking chain in a separate thread class Tracker_PT : public QThread, public ITracker { Q_OBJECT + friend class camera_dialog; + friend class TrackerDialog_PT; public: Tracker_PT(); ~Tracker_PT() override; @@ -61,6 +66,7 @@ private: volatile int commands; + QMutex camera_mtx; CVCamera camera; PointExtractor point_extractor; PointTracker point_tracker; diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp index 696f0b1b..5b17df5b 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp @@ -83,9 +83,15 @@ TrackerDialog_PT::TrackerDialog_PT() connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(&timer,SIGNAL(timeout()), this,SLOT(poll_tracker_info())); + connect(ui.camera_settings, SIGNAL(pressed()), this, SLOT(camera_settings())); timer.start(100); } +void TrackerDialog_PT::camera_settings() +{ + open_camera_settings(tracker ? &static_cast(tracker->camera) : nullptr, s.camera_name, tracker ? &tracker->camera_mtx : nullptr); +} + void TrackerDialog_PT::startstop_trans_calib(bool start) { if (start) diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h index c1cd2e3b..b9aba4a6 100644 --- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h +++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h @@ -18,12 +18,13 @@ #include "trans_calib.h" #include "pt_video_widget.h" #include "ui_FTNoIR_PT_Controls.h" +#include "opentrack/opencv-camera-dialog.hpp" #include //----------------------------------------------------------------------------- // The dialog that shows up when the user presses "Settings" -class TrackerDialog_PT : public ITrackerDialog +class TrackerDialog_PT : public ITrackerDialog, protected camera_dialog { Q_OBJECT public: @@ -39,6 +40,7 @@ public slots: void startstop_trans_calib(bool start); void poll_tracker_info(); + void camera_settings(); private: settings_pt s; Tracker_PT* tracker; -- cgit v1.2.3 From fcb8ca75c0c274be2321f0ba91e9f129ae63e354 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 6 Jul 2015 10:42:28 +0200 Subject: ht: initial camera dialog It doesn't work while tracking. Can't pass DirectShow handle through shared memory. --- CMakeLists.txt | 10 +++--- ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 6 ++++ ftnoir_tracker_ht/ftnoir_tracker_ht.h | 5 ++- ftnoir_tracker_ht/ht-trackercontrols.ui | 60 ++++++++++++++++++++------------- 4 files changed, 53 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c45163dc..7046c549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -367,11 +367,13 @@ if(OpenCV_FOUND) target_link_libraries(opentrack-filter-kalman ${OpenCV_LIBS}) target_include_directories(opentrack-filter-kalman SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS}) -endif() -opentrack_library(opentrack-tracker-ht ftnoir_tracker_ht) -target_link_libraries(opentrack-tracker-ht opentrack-compat) -link_with_dinput8(opentrack-tracker-ht) + opentrack_library(opentrack-tracker-ht ftnoir_tracker_ht) + target_link_libraries(opentrack-tracker-ht opentrack-compat) + link_with_dinput8(opentrack-tracker-ht) + target_link_libraries(opentrack-tracker-ht ${OpenCV_LIBS}) + target_include_directories(opentrack-tracker-ht SYSTEM PUBLIC ${OpenCV_INCLUDE_DIRS}) +endif() link_with_dinput8(opentrack-tracker-joystick) diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index b922c0b2..3d142dcb 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -170,6 +170,7 @@ TrackerControls::TrackerControls() tie_setting(s.resolution, ui.resolution); connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.camera_settings, SIGNAL(pressed()), this, SLOT(camera_settings())); } void TrackerControls::doOK() @@ -183,3 +184,8 @@ void TrackerControls::doCancel() s.b->reload(); this->close(); } + +void TrackerControls::camera_settings() +{ + open_camera_settings(nullptr, s.camera_name, nullptr); +} diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.h b/ftnoir_tracker_ht/ftnoir_tracker_ht.h index cd4ffa16..25839039 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.h +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.h @@ -16,6 +16,8 @@ #include #include "opentrack/options.hpp" #include "opentrack/plugin-api.hpp" +#include "opentrack/opencv-camera-dialog.hpp" + using namespace options; struct settings : opts { @@ -50,7 +52,7 @@ private: }; // Widget that has controls for FTNoIR protocol client-settings. -class TrackerControls : public ITrackerDialog +class TrackerControls : public ITrackerDialog, protected camera_dialog { Q_OBJECT public: @@ -65,6 +67,7 @@ private: private slots: void doOK(); void doCancel(); + void camera_settings(); }; #endif diff --git a/ftnoir_tracker_ht/ht-trackercontrols.ui b/ftnoir_tracker_ht/ht-trackercontrols.ui index 0b94ffc5..dd5e57f3 100644 --- a/ftnoir_tracker_ht/ht-trackercontrols.ui +++ b/ftnoir_tracker_ht/ht-trackercontrols.ui @@ -10,7 +10,7 @@ 0 0 354 - 158 + 179 @@ -29,6 +29,13 @@ HT tracker settings + + + + Frames per second + + + @@ -52,13 +59,6 @@ - - - - Frames per second - - - @@ -88,23 +88,9 @@ - - - - Camera name - - - - - - - Resolution - - - @@ -129,13 +115,41 @@ - + + + + Resolution + + + + + + + Camera name + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + Camera settings + + + + + + + Open + + + -- cgit v1.2.3