From c1f59615f9639bae75cd0e1a7cffe118ac6a7b41 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Sat, 7 Apr 2018 07:37:50 -0600 Subject: Updated winbuild to include imu tracker --- winbuild/calibrate/calibrate.vcxproj | 82 ++++++++++++++++++++++++++ winbuild/data_recorder/data_recorder.vcxproj | 78 ++++++++++++++++++++++++ winbuild/libsurvive.sln | 3 + winbuild/libsurvive/libsurvive.vcxproj | 71 +++++++++++++++++++++- winbuild/libsurvive/libsurvive.vcxproj.filters | 3 + winbuild/test/test.vcxproj | 78 ++++++++++++++++++++++++ 6 files changed, 313 insertions(+), 2 deletions(-) (limited to 'winbuild') diff --git a/winbuild/calibrate/calibrate.vcxproj b/winbuild/calibrate/calibrate.vcxproj index d0b1c48..feb72fd 100644 --- a/winbuild/calibrate/calibrate.vcxproj +++ b/winbuild/calibrate/calibrate.vcxproj @@ -17,6 +17,14 @@ Release x64 + + RelWDebInfo + Win32 + + + RelWDebInfo + x64 + 15.0 @@ -39,6 +47,13 @@ true MultiByte + + Application + false + v141 + true + MultiByte + Application true @@ -52,6 +67,13 @@ true MultiByte + + Application + false + v141 + true + MultiByte + @@ -63,12 +85,18 @@ + + + + + + true @@ -80,9 +108,15 @@ false + + false + false + + false + @@ -152,6 +186,30 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;RUNTIME_SYMNUMX;HIDAPI;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) + + + Console + true + true + + + setupapi.lib;dbghelp.lib;%(AdditionalDependencies) + true + + + true + + Level3 @@ -176,6 +234,30 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;RUNTIME_SYMNUMX;HIDAPI;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) + + + Console + true + true + + + setupapi.lib;dbghelp.lib;%(AdditionalDependencies) + true + + + true + + diff --git a/winbuild/data_recorder/data_recorder.vcxproj b/winbuild/data_recorder/data_recorder.vcxproj index e63d474..9f3f86a 100644 --- a/winbuild/data_recorder/data_recorder.vcxproj +++ b/winbuild/data_recorder/data_recorder.vcxproj @@ -17,6 +17,14 @@ Release x64 + + RelWDebInfo + Win32 + + + RelWDebInfo + x64 + 15.0 @@ -39,6 +47,13 @@ true MultiByte + + Application + false + v141 + true + MultiByte + Application true @@ -52,6 +67,13 @@ true MultiByte + + Application + false + v141 + true + MultiByte + @@ -63,12 +85,18 @@ + + + + + + true @@ -80,9 +108,15 @@ false + + false + false + + false + @@ -143,6 +177,28 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;HIDAPI;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist; + + + Console + true + true + setupapi.lib;dbghelp.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + + + true + + Level3 @@ -165,6 +221,28 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;HIDAPI;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist; + + + Console + true + true + setupapi.lib;dbghelp.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + + + true + + {435cfd2c-8724-42ee-8fde-71ef7d2c6b2f} diff --git a/winbuild/libsurvive.sln b/winbuild/libsurvive.sln index b525975..3a8b2da 100644 --- a/winbuild/libsurvive.sln +++ b/winbuild/libsurvive.sln @@ -55,4 +55,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5C1AB415-DC8F-42C0-B2E0-7300D0C79E09} + EndGlobalSection EndGlobal diff --git a/winbuild/libsurvive/libsurvive.vcxproj b/winbuild/libsurvive/libsurvive.vcxproj index 4b76c99..520279c 100644 --- a/winbuild/libsurvive/libsurvive.vcxproj +++ b/winbuild/libsurvive/libsurvive.vcxproj @@ -17,6 +17,14 @@ Release x64 + + RelWDebInfo + Win32 + + + RelWDebInfo + x64 + 15.0 @@ -39,6 +47,13 @@ true MultiByte + + StaticLibrary + false + v141 + true + MultiByte + DynamicLibrary true @@ -46,7 +61,14 @@ MultiByte - StaticLibrary + DynamicLibrary + false + v141 + true + MultiByte + + + DynamicLibrary false v141 true @@ -64,12 +86,18 @@ + + + + + + $(IncludePath) @@ -132,6 +160,24 @@ + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;RUNTIME_SYMNUM;RUNTIME_SYMNUMX;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) + + + Windows + true + true + + + Level3 @@ -140,13 +186,33 @@ MaxSpeed true true - USE_DOUBLE;RUNTIME_SYMNUM;RUNTIME_SYMNUMX;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;NDEBUG;_LIB;%(PreprocessorDefinitions) + FLT=double;USE_DOUBLE;MANUAL_REGISTRATION;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;_DEBUG;_LIB;HAVE_LAPACK_CONFIG_H;LAPACK_COMPLEX_STRUCTURE;%(PreprocessorDefinitions) ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) Windows true true + DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + + + + + + Level3 + + + MaxSpeed + true + true + FLT=double;USE_DOUBLE;MANUAL_REGISTRATION;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;_DEBUG;_LIB;HAVE_LAPACK_CONFIG_H;LAPACK_COMPLEX_STRUCTURE;%(PreprocessorDefinitions) + ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) + + + Windows + true + true + DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) @@ -184,6 +250,7 @@ + diff --git a/winbuild/libsurvive/libsurvive.vcxproj.filters b/winbuild/libsurvive/libsurvive.vcxproj.filters index 1f98c68..d06f083 100644 --- a/winbuild/libsurvive/libsurvive.vcxproj.filters +++ b/winbuild/libsurvive/libsurvive.vcxproj.filters @@ -135,6 +135,9 @@ Source Files + + Source Files + diff --git a/winbuild/test/test.vcxproj b/winbuild/test/test.vcxproj index 8df96d3..ae130b4 100644 --- a/winbuild/test/test.vcxproj +++ b/winbuild/test/test.vcxproj @@ -17,6 +17,14 @@ Release x64 + + RelWDebInfo + Win32 + + + RelWDebInfo + x64 + 15.0 @@ -39,6 +47,13 @@ true Unicode + + Application + false + v141 + true + Unicode + Application true @@ -52,6 +67,13 @@ true Unicode + + Application + false + v141 + true + Unicode + @@ -63,12 +85,18 @@ + + + + + + true @@ -81,9 +109,15 @@ false + + false + false + + false + @@ -144,6 +178,28 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;HIDAPI;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist; + + + Console + true + true + setupapi.lib;dbghelp.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + + + true + + Level3 @@ -166,6 +222,28 @@ true + + + Level3 + + + MaxSpeed + true + true + USE_DOUBLE;HIDAPI;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + ..\..\windows;..\..\include\libsurvive;..\..\redist; + + + Console + true + true + setupapi.lib;dbghelp.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + true + + + true + + {435cfd2c-8724-42ee-8fde-71ef7d2c6b2f} -- cgit v1.3.1 From b792a65dbfbb304927400ca6c754195d92089b61 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Sat, 7 Apr 2018 08:46:50 -0600 Subject: Fixed 32 bit linker issue --- include/libsurvive/survive.h | 3 +-- src/survive.c | 2 +- winbuild/libsurvive/libsurvive.vcxproj | 30 ++++++++++++++++++++++++------ 3 files changed, 26 insertions(+), 9 deletions(-) (limited to 'winbuild') diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h index 65343b7..c1bb52c 100644 --- a/include/libsurvive/survive.h +++ b/include/libsurvive/survive.h @@ -323,8 +323,7 @@ void RegisterDriver(const char *name, void *data); #ifdef _MSC_VER #define REGISTER_LINKTIME(func) \ - __pragma(comment(linker, "/export:REGISTER" #func)); \ - void REGISTER##func() { RegisterDriver(#func, &func); } + SURVIVE_EXPORT void REGISTER##func() { RegisterDriver(#func, &func); } #else #define REGISTER_LINKTIME(func) \ void __attribute__((constructor)) REGISTER##func() { RegisterDriver(#func, &func); } diff --git a/src/survive.c b/src/survive.c index b024bbb..9e750f9 100644 --- a/src/survive.c +++ b/src/survive.c @@ -106,7 +106,7 @@ SurviveContext *survive_init_internal(int argc, char *const *argv) { static int did_manual_driver_registration = 0; if (did_manual_driver_registration == 0) { #define MANUAL_DRIVER_REGISTRATION(func) \ - int func(SurviveObject *so, PoserData *pd); \ + int func(SurviveObject *so, PoserData *pd); \ RegisterDriver(#func, &func); MANUAL_DRIVER_REGISTRATION(PoserCharlesSlow) diff --git a/winbuild/libsurvive/libsurvive.vcxproj b/winbuild/libsurvive/libsurvive.vcxproj index 520279c..fb1b9a5 100644 --- a/winbuild/libsurvive/libsurvive.vcxproj +++ b/winbuild/libsurvive/libsurvive.vcxproj @@ -41,14 +41,14 @@ MultiByte - StaticLibrary + DynamicLibrary false v141 true MultiByte - StaticLibrary + DynamicLibrary false v141 true @@ -117,7 +117,7 @@ Windows DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) true - $(IntDir)Test.txt + libsurvive.map true @@ -134,11 +134,15 @@ Level3 Disabled - USE_DOUBLE;RUNTIME_SYMNUM;RUNTIME_SYMNUMX;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + FLT=double;USE_DOUBLE;MANUAL_REGISTRATION;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;_DEBUG;_LIB;HAVE_LAPACK_CONFIG_H;LAPACK_COMPLEX_STRUCTURE;%(PreprocessorDefinitions) ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) Windows + DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + true + true + libsurvive.map @@ -150,13 +154,17 @@ MaxSpeed true true - USE_DOUBLE;RUNTIME_SYMNUM;RUNTIME_SYMNUMX;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + FLT=double;USE_DOUBLE;MANUAL_REGISTRATION;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;_DEBUG;_LIB;HAVE_LAPACK_CONFIG_H;LAPACK_COMPLEX_STRUCTURE;%(PreprocessorDefinitions) ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) Windows true true + DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + true + true + libsurvive.map @@ -168,13 +176,17 @@ MaxSpeed true true - USE_DOUBLE;RUNTIME_SYMNUM;RUNTIME_SYMNUMX;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + FLT=double;USE_DOUBLE;MANUAL_REGISTRATION;NOZLIB;_CRT_SECURE_NO_WARNINGS;HIDAPI;WINDOWS;_DEBUG;_LIB;HAVE_LAPACK_CONFIG_H;LAPACK_COMPLEX_STRUCTURE;%(PreprocessorDefinitions) ..\..\winbuild;..\..\include\libsurvive;..\..\redist;%(AdditionalIncludeDirectories) Windows true true + DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + true + true + libsurvive.map @@ -194,6 +206,9 @@ true true DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + true + true + libsurvive.map @@ -213,6 +228,9 @@ true true DbgHelp.lib;SetupAPI.lib;%(AdditionalDependencies) + true + true + libsurvive.map -- cgit v1.3.1 From 7f4385538d6b19ea5dd3f00c4a0eb49385798031 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Mon, 9 Apr 2018 09:33:40 -0600 Subject: Made new posers work in windows --- src/poser_epnp.c | 2 +- src/poser_general_optimizer.c | 3 ++- src/poser_mpfit.c | 15 ++++----------- src/poser_sba.c | 2 +- src/survive.c | 2 ++ winbuild/libsurvive/libsurvive.vcxproj | 6 ++++++ winbuild/libsurvive/libsurvive.vcxproj.filters | 18 ++++++++++++++++++ 7 files changed, 34 insertions(+), 14 deletions(-) (limited to 'winbuild') diff --git a/src/poser_epnp.c b/src/poser_epnp.c index 615c01c..851ce29 100644 --- a/src/poser_epnp.c +++ b/src/poser_epnp.c @@ -129,7 +129,7 @@ int PoserEPNP(SurviveObject *so, PoserData *pd) { case POSERDATA_LIGHT: { PoserDataLight *lightData = (PoserDataLight *)pd; - SurvivePose posers[2] = {}; + SurvivePose posers[2] = { 0 }; int meas[2] = {0, 0}; for (int lh = 0; lh < so->ctx->activeLighthouses; lh++) { if (so->ctx->bsd[lh].PositionSet) { diff --git a/src/poser_general_optimizer.c b/src/poser_general_optimizer.c index 313e378..b3c4e65 100644 --- a/src/poser_general_optimizer.c +++ b/src/poser_general_optimizer.c @@ -1,6 +1,7 @@ #include "poser_general_optimizer.h" #include "string.h" -#include + +#include #include #include diff --git a/src/poser_mpfit.c b/src/poser_mpfit.c index 03ef522..439d151 100644 --- a/src/poser_mpfit.c +++ b/src/poser_mpfit.c @@ -167,22 +167,15 @@ static double run_mpfit_find_3d_structure(MPFITData *d, PoserDataLight *pdl, Sur } failure_count = 0; - SurvivePose soLocation = {}; + SurvivePose soLocation = { 0 }; if (!general_optimizer_data_record_current_pose(&d->opt, &pdl->hdr, sizeof(*pdl), &soLocation)) { return -1; } - mp_result result = {}; - mp_par pars[7] = {}; - pars[0].parname = "X"; - pars[1].parname = "Y"; - pars[2].parname = "Z"; - pars[3].parname = "w"; - pars[4].parname = "i"; - pars[5].parname = "j"; - pars[6].parname = "k"; - + mp_result result = { 0 }; + mp_par pars[7] = { 0 }; + const bool debug_jacobian = false; if (d->use_jacobian_function) { for (int i = 0; i < 7; i++) { diff --git a/src/poser_sba.c b/src/poser_sba.c index 4c7fcd1..5166951 100644 --- a/src/poser_sba.c +++ b/src/poser_sba.c @@ -230,7 +230,7 @@ static double run_sba_find_3d_structure(SBAData *d, PoserDataLight *pdl, Survive } failure_count = 0; - SurvivePose soLocation = {}; + SurvivePose soLocation = { 0 }; if (!general_optimizer_data_record_current_pose(&d->opt, &pdl->hdr, sizeof(*pdl), &soLocation)) { return -1; diff --git a/src/survive.c b/src/survive.c index 9e750f9..1ab09da 100644 --- a/src/survive.c +++ b/src/survive.c @@ -114,6 +114,8 @@ SurviveContext *survive_init_internal(int argc, char *const *argv) { MANUAL_DRIVER_REGISTRATION(PoserDummy) MANUAL_DRIVER_REGISTRATION(PoserEPNP) MANUAL_DRIVER_REGISTRATION(PoserSBA) + MANUAL_DRIVER_REGISTRATION(PoserCharlesRefine) + MANUAL_DRIVER_REGISTRATION(PoserMPFIT) MANUAL_DRIVER_REGISTRATION(DriverRegHTCVive) MANUAL_DRIVER_REGISTRATION(DriverRegPlayback) diff --git a/winbuild/libsurvive/libsurvive.vcxproj b/winbuild/libsurvive/libsurvive.vcxproj index fb1b9a5..8a0aaf1 100644 --- a/winbuild/libsurvive/libsurvive.vcxproj +++ b/winbuild/libsurvive/libsurvive.vcxproj @@ -244,6 +244,7 @@ + @@ -254,10 +255,13 @@ + + + @@ -288,11 +292,13 @@ + + diff --git a/winbuild/libsurvive/libsurvive.vcxproj.filters b/winbuild/libsurvive/libsurvive.vcxproj.filters index d06f083..019631b 100644 --- a/winbuild/libsurvive/libsurvive.vcxproj.filters +++ b/winbuild/libsurvive/libsurvive.vcxproj.filters @@ -138,6 +138,18 @@ Source Files + + Source Files + + + Source Files + + + Source Files + + + Source Files + @@ -191,6 +203,12 @@ Source Files + + Source Files + + + Source Files + -- cgit v1.3.1