Skip to content

Commit b997e7b

Browse files
authored
Merge pull request #32 from mbientlab/win_reintro
win10: restore build files and support.
2 parents 1c9bfed + b9e08f8 commit b997e7b

File tree

6 files changed

+204
-6
lines changed

6 files changed

+204
-6
lines changed

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "MetaWear C++ API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.20.6
41+
PROJECT_NUMBER = 0.20.7
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

MetaWear.Win32.vcxproj

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectGuid>{779F1B32-5465-416E-B14F-3F5256644E5F}</ProjectGuid>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectName>MetaWear.Win32</ProjectName>
25+
<RootNamespace>MetaWear.Win32</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
27+
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
28+
</PropertyGroup>
29+
<PropertyGroup>
30+
<OutDir>dist\$(Configuration)\lib\$(Platform)\</OutDir>
31+
<IntermediateOutputPath>build\$(Platform)\$(Configuration)\$(ProjectName)\</IntermediateOutputPath>
32+
</PropertyGroup>
33+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
34+
<PropertyGroup Label="Configuration">
35+
<ConfigurationType>DynamicLibrary</ConfigurationType>
36+
<UseDebugLibraries Condition="'$(Configuration)'=='Debug'">true</UseDebugLibraries>
37+
<UseDebugLibraries Condition="'$(Configuration)'=='Release'">false</UseDebugLibraries>
38+
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
39+
<PlatformToolset>v141</PlatformToolset>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
43+
<ImportGroup Label="ExtensionSettings">
44+
</ImportGroup>
45+
<ImportGroup Label="Shared">
46+
</ImportGroup>
47+
<ImportGroup Label="PropertySheets">
48+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
49+
</ImportGroup>
50+
<PropertyGroup Label="UserMacros" />
51+
<PropertyGroup>
52+
<LinkIncremental Condition="'$(Configuration)'=='Debug'">true</LinkIncremental>
53+
<LinkIncremental Condition="'$(Configuration)'=='Release'">false</LinkIncremental>
54+
<IncludePath>$(MSBuildProjectDirectory)\src;$(IncludePath)</IncludePath>
55+
</PropertyGroup>
56+
<ItemDefinitionGroup>
57+
<ClCompile>
58+
<WarningLevel>Level3</WarningLevel>
59+
<PrecompiledHeader>
60+
</PrecompiledHeader>
61+
<Optimization Condition="'$(Configuration)'=='Debug'">Disabled</Optimization>
62+
<Optimization Condition="'$(Configuration)'=='Release'">MaxSpeed</Optimization>
63+
<FunctionLevelLinking Condition="'$(Configuration)'=='Release'">true</FunctionLevelLinking>
64+
<IntrinsicFunctions Condition="'$(Configuration)'=='Release'">true</IntrinsicFunctions>
65+
<PreprocessorDefinitions>METAWEAR_DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66+
</ClCompile>
67+
<Link>
68+
<SubSystem>Windows</SubSystem>
69+
<EnableCOMDATFolding Condition="'$(Configuration)'=='Release'">true</EnableCOMDATFolding>
70+
<OptimizeReferences Condition="'$(Configuration)'=='Release'">true</OptimizeReferences>
71+
<GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>
72+
</Link>
73+
</ItemDefinitionGroup>
74+
<ItemGroup>
75+
<ClInclude Include="src\metawear\**\cpp\*.h" />
76+
<ClInclude Include="src\metawear\**\*.h" />
77+
<ClCompile Include="src\metawear\core\**\*.cpp" />
78+
<ClCompile Include="src\metawear\dfu\**\*.cpp" />
79+
<ClCompile Include="src\metawear\impl\**\*.cpp" />
80+
<ClCompile Include="src\metawear\peripheral\**\*.cpp" />
81+
<ClCompile Include="src\metawear\platform\**\*.cpp" />
82+
<ClCompile Include="src\metawear\processor\**\*.cpp" />
83+
<ClCompile Include="src\metawear\sensor\**\*.cpp" />
84+
</ItemGroup>
85+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
86+
<ImportGroup Label="ExtensionTargets">
87+
</ImportGroup>
88+
<UsingTask TaskName="SetEnv" AssemblyFile="$(MSBuildThisFileDirectory)Microsoft.Build.CppTasks.Common.dll"/>
89+
<Target Name="Test" DependsOnTargets="Build">
90+
<SetEnv Name ="METAWEAR_LIB_SO_NAME"
91+
Value ="$(TargetPath)"
92+
Prefix ="false">
93+
</SetEnv>
94+
95+
<SetEnv Name ="PYTHONPATH"
96+
Value ="bindings\python"
97+
Prefix ="false">
98+
</SetEnv>
99+
<Exec Command="python -m unittest discover -s test" />
100+
</Target>
101+
</Project>

MetaWear.WinRT.vcxproj

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|ARM">
5+
<Configuration>Debug</Configuration>
6+
<Platform>ARM</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|Win32">
9+
<Configuration>Debug</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|ARM">
17+
<Configuration>Release</Configuration>
18+
<Platform>ARM</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release|Win32">
21+
<Configuration>Release</Configuration>
22+
<Platform>Win32</Platform>
23+
</ProjectConfiguration>
24+
<ProjectConfiguration Include="Release|x64">
25+
<Configuration>Release</Configuration>
26+
<Platform>x64</Platform>
27+
</ProjectConfiguration>
28+
</ItemGroup>
29+
<PropertyGroup Label="Globals">
30+
<ProjectGuid>{6fcc44f2-ee6e-4ad1-9442-e35a935fe628}</ProjectGuid>
31+
<Keyword>WindowsRuntimeComponent</Keyword>
32+
<ProjectName>MetaWear.WinRT</ProjectName>
33+
<RootNamespace>MetaWear.WinRT</RootNamespace>
34+
<DefaultLanguage>en-US</DefaultLanguage>
35+
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
36+
<AppContainerApplication>true</AppContainerApplication>
37+
<ApplicationType>Windows Store</ApplicationType>
38+
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
39+
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
40+
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
41+
</PropertyGroup>
42+
<PropertyGroup>
43+
<OutDir>dist\$(Configuration)\lib\$(Platform)\</OutDir>
44+
<IntermediateOutputPath>build\$(Platform)\$(Configuration)\$(ProjectName)\</IntermediateOutputPath>
45+
</PropertyGroup>
46+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
47+
<PropertyGroup Label="Configuration">
48+
<ConfigurationType>DynamicLibrary</ConfigurationType>
49+
<UseDebugLibraries Condition="'$(Configuration)'=='Debug'">true</UseDebugLibraries>
50+
<UseDebugLibraries Condition="'$(Configuration)'=='Release'">false</UseDebugLibraries>
51+
<WholeProgramOptimization Condition="'$(Configuration)'=='Release'">true</WholeProgramOptimization>
52+
<PlatformToolset>v141</PlatformToolset>
53+
</PropertyGroup>
54+
<ItemGroup>
55+
<ClInclude Include="src\metawear\**\cpp\*.h" />
56+
<ClInclude Include="src\metawear\**\*.h" />
57+
<ClCompile Include="src\metawear\core\**\*.cpp" />
58+
<ClCompile Include="src\metawear\dfu\**\*.cpp" />
59+
<ClCompile Include="src\metawear\impl\**\*.cpp" />
60+
<ClCompile Include="src\metawear\peripheral\**\*.cpp" />
61+
<ClCompile Include="src\metawear\platform\**\*.cpp" />
62+
<ClCompile Include="src\metawear\processor\**\*.cpp" />
63+
<ClCompile Include="src\metawear\sensor\**\*.cpp" />
64+
</ItemGroup>
65+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
66+
<ImportGroup Label="ExtensionSettings">
67+
</ImportGroup>
68+
<ImportGroup Label="Shared">
69+
</ImportGroup>
70+
<ImportGroup Label="PropertySheets">
71+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
72+
</ImportGroup>
73+
<PropertyGroup Label="UserMacros" />
74+
<PropertyGroup />
75+
<PropertyGroup>
76+
<IncludePath>$(MSBuildProjectDirectory)\src;$(IncludePath)</IncludePath>
77+
</PropertyGroup>
78+
<ItemDefinitionGroup>
79+
<ClCompile>
80+
<PrecompiledHeader>NotUsing</PrecompiledHeader>
81+
<PreprocessorDefinitions>METAWEAR_DLL_EXPORTS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
82+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
83+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
84+
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
85+
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
86+
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
87+
</ClCompile>
88+
<Link>
89+
<SubSystem>Console</SubSystem>
90+
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
91+
</Link>
92+
</ItemDefinitionGroup>
93+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
94+
<ImportGroup Label="ExtensionTargets">
95+
</ImportGroup>
96+
</Project>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ dist/
7575
└── lib
7676
└── x64
7777
├── libmetawear.so -> libmetawear.so.0
78-
├── libmetawear.so.0 -> libmetawear.so.0.20.6
79-
└── libmetawear.so.0.20.6
78+
├── libmetawear.so.0 -> libmetawear.so.0.20.7
79+
└── libmetawear.so.0.20.7
8080

8181
```
8282

project_version.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=0.20.6
1+
VERSION=0.20.7
22
VERSION_MAJOR=0
33
VERSION_MINOR=20
4-
VERSION_STEP=6
4+
VERSION_STEP=7

src/metawear/impl/cpp/metawearboard.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ int32_t response_handler_packed_data(MblMwMetaWearBoard *board, const uint8_t *r
178178
MblMwDataSignal* signal;
179179
auto it = board->module_events.find(header);
180180

181-
if (it == board->module_events.end() || (signal = dynamic_cast<MblMwDataSignal*>(it->second))->handler == nullptr) {
181+
signal = dynamic_cast<MblMwDataSignal*>(it->second);
182+
if (it == board->module_events.end() || signal->handler == nullptr) {
182183
return MBL_MW_STATUS_WARNING_UNEXPECTED_SENSOR_DATA;
183184
}
184185

0 commit comments

Comments
 (0)