Skip to content

Commit 87f61ea

Browse files
lostinspacebarzarvox
authored andcommitted
Fixed up ConsoleTest project for new API changes. Also made small tweaks in different places for new API and for Windows buildage. KinectDemo now runs on windows. Still get very poor FPS, but it does run. Maybe win32 driver is to blame? Not sure. Will investigate.
Signed-off-by: Aditya Gaddam <[email protected]> (LostInCake)
1 parent 4d3c590 commit 87f61ea

File tree

12 files changed

+476
-411
lines changed

12 files changed

+476
-411
lines changed

wrappers/csharp/src/lib/VS2008/freenectdotnet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<ProjectGuid>{360413F9-4D9B-46BE-BEC7-9B666850ED8C}</ProjectGuid>
99
<OutputType>Library</OutputType>
1010
<RootNamespace>freenect</RootNamespace>
11-
<AssemblyName>freenect</AssemblyName>
11+
<AssemblyName>freenectdotnet</AssemblyName>
1212
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
1313
</PropertyGroup>
1414
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
Lines changed: 155 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,156 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>9.0.21022</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{360413F9-4D9B-46BE-BEC7-9B666850ED8C}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<RootNamespace>freenect</RootNamespace>
11-
<AssemblyName>freenect</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13-
<FileUpgradeFlags>
14-
</FileUpgradeFlags>
15-
<OldToolsVersion>3.5</OldToolsVersion>
16-
<UpgradeBackupLocation />
17-
<PublishUrl>publish\</PublishUrl>
18-
<Install>true</Install>
19-
<InstallFrom>Disk</InstallFrom>
20-
<UpdateEnabled>false</UpdateEnabled>
21-
<UpdateMode>Foreground</UpdateMode>
22-
<UpdateInterval>7</UpdateInterval>
23-
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24-
<UpdatePeriodically>false</UpdatePeriodically>
25-
<UpdateRequired>false</UpdateRequired>
26-
<MapFileExtensions>true</MapFileExtensions>
27-
<ApplicationRevision>0</ApplicationRevision>
28-
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29-
<IsWebBootstrapper>false</IsWebBootstrapper>
30-
<UseApplicationTrust>false</UseApplicationTrust>
31-
<BootstrapperEnabled>true</BootstrapperEnabled>
32-
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
33-
</PropertyGroup>
34-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
35-
<DebugSymbols>true</DebugSymbols>
36-
<DebugType>full</DebugType>
37-
<Optimize>false</Optimize>
38-
<OutputPath>..\..\..\bin\</OutputPath>
39-
<DefineConstants>DEBUG</DefineConstants>
40-
<ErrorReport>prompt</ErrorReport>
41-
<WarningLevel>4</WarningLevel>
42-
<ConsolePause>false</ConsolePause>
43-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
45-
</PropertyGroup>
46-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
47-
<DebugType>none</DebugType>
48-
<Optimize>false</Optimize>
49-
<OutputPath>..\..\..\bin\</OutputPath>
50-
<ErrorReport>prompt</ErrorReport>
51-
<WarningLevel>4</WarningLevel>
52-
<ConsolePause>false</ConsolePause>
53-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
54-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
55-
</PropertyGroup>
56-
<ItemGroup>
57-
<Reference Include="System" />
58-
<Reference Include="System.Drawing" />
59-
</ItemGroup>
60-
<ItemGroup>
61-
<Compile Include="..\Accelerometer.cs">
62-
<Link>Accelerometer.cs</Link>
63-
</Compile>
64-
<Compile Include="..\AssemblyInfo.cs">
65-
<Link>AssemblyInfo.cs</Link>
66-
</Compile>
67-
<Compile Include="..\DepthCamera.cs">
68-
<Link>DepthCamera.cs</Link>
69-
</Compile>
70-
<Compile Include="..\Kinect.cs">
71-
<Link>Kinect.cs</Link>
72-
</Compile>
73-
<Compile Include="..\KinectNative.cs">
74-
<Link>KinectNative.cs</Link>
75-
</Compile>
76-
<Compile Include="..\Motor.cs">
77-
<Link>Motor.cs</Link>
78-
</Compile>
79-
<Compile Include="..\LED.cs">
80-
<Link>LED.cs</Link>
81-
</Compile>
82-
<Compile Include="..\LogEventArgs.cs">
83-
<Link>LogEventArgs.cs</Link>
84-
</Compile>
85-
<Compile Include="..\DepthMap.cs">
86-
<Link>DepthMap.cs</Link>
87-
</Compile>
88-
<Compile Include="..\ImageMap.cs">
89-
<Link>ImageMap.cs</Link>
90-
</Compile>
91-
<Compile Include="..\VideoCamera.cs">
92-
<Link>VideoCamera.cs</Link>
93-
</Compile>
94-
<Compile Include="..\SwapBufferCollection.cs">
95-
<Link>SwapBufferCollection.cs</Link>
96-
</Compile>
97-
<Compile Include="..\BaseCamera.cs">
98-
<Link>BaseCamera.cs</Link>
99-
</Compile>
100-
<Compile Include="..\BaseDataMap.cs">
101-
<Link>BaseDataMap.cs</Link>
102-
</Compile>
103-
<Compile Include="..\DepthFrameMode.cs">
104-
<Link>DepthFrameMode.cs</Link>
105-
</Compile>
106-
<Compile Include="..\Enumerations.cs">
107-
<Link>Enumerations.cs</Link>
108-
</Compile>
109-
<Compile Include="..\FrameMode.cs">
110-
<Link>FrameMode.cs</Link>
111-
</Compile>
112-
<Compile Include="..\VideoFrameMode.cs">
113-
<Link>VideoFrameMode.cs</Link>
114-
</Compile>
115-
</ItemGroup>
116-
<ItemGroup>
117-
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
118-
<Visible>False</Visible>
119-
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
120-
<Install>false</Install>
121-
</BootstrapperPackage>
122-
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
123-
<Visible>False</Visible>
124-
<ProductName>.NET Framework 3.5 SP1</ProductName>
125-
<Install>true</Install>
126-
</BootstrapperPackage>
127-
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
128-
<Visible>False</Visible>
129-
<ProductName>Windows Installer 3.1</ProductName>
130-
<Install>true</Install>
131-
</BootstrapperPackage>
132-
</ItemGroup>
133-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>9.0.21022</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{360413F9-4D9B-46BE-BEC7-9B666850ED8C}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>freenect</RootNamespace>
11+
<AssemblyName>freenectdotnet</AssemblyName>
12+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13+
<FileUpgradeFlags>
14+
</FileUpgradeFlags>
15+
<OldToolsVersion>3.5</OldToolsVersion>
16+
<UpgradeBackupLocation />
17+
<PublishUrl>publish\</PublishUrl>
18+
<Install>true</Install>
19+
<InstallFrom>Disk</InstallFrom>
20+
<UpdateEnabled>false</UpdateEnabled>
21+
<UpdateMode>Foreground</UpdateMode>
22+
<UpdateInterval>7</UpdateInterval>
23+
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
24+
<UpdatePeriodically>false</UpdatePeriodically>
25+
<UpdateRequired>false</UpdateRequired>
26+
<MapFileExtensions>true</MapFileExtensions>
27+
<ApplicationRevision>0</ApplicationRevision>
28+
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
29+
<IsWebBootstrapper>false</IsWebBootstrapper>
30+
<UseApplicationTrust>false</UseApplicationTrust>
31+
<BootstrapperEnabled>true</BootstrapperEnabled>
32+
<TargetFrameworkProfile>
33+
</TargetFrameworkProfile>
34+
</PropertyGroup>
35+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
36+
<DebugSymbols>true</DebugSymbols>
37+
<DebugType>full</DebugType>
38+
<Optimize>false</Optimize>
39+
<OutputPath>..\..\..\bin\</OutputPath>
40+
<DefineConstants>DEBUG</DefineConstants>
41+
<ErrorReport>prompt</ErrorReport>
42+
<WarningLevel>4</WarningLevel>
43+
<ConsolePause>false</ConsolePause>
44+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
45+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
46+
</PropertyGroup>
47+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
48+
<DebugType>none</DebugType>
49+
<Optimize>false</Optimize>
50+
<OutputPath>..\..\..\bin\</OutputPath>
51+
<ErrorReport>prompt</ErrorReport>
52+
<WarningLevel>4</WarningLevel>
53+
<ConsolePause>false</ConsolePause>
54+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
55+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
56+
</PropertyGroup>
57+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
58+
<DebugSymbols>true</DebugSymbols>
59+
<OutputPath>..\..\..\bin\</OutputPath>
60+
<DefineConstants>DEBUG</DefineConstants>
61+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
62+
<DebugType>full</DebugType>
63+
<PlatformTarget>x64</PlatformTarget>
64+
<ErrorReport>prompt</ErrorReport>
65+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
66+
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
67+
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
68+
</PropertyGroup>
69+
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
70+
<OutputPath>..\..\..\bin\</OutputPath>
71+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
72+
<PlatformTarget>x64</PlatformTarget>
73+
<ErrorReport>prompt</ErrorReport>
74+
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
75+
<CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
76+
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
77+
</PropertyGroup>
78+
<ItemGroup>
79+
<Reference Include="System" />
80+
<Reference Include="System.Drawing" />
81+
</ItemGroup>
82+
<ItemGroup>
83+
<Compile Include="..\Accelerometer.cs">
84+
<Link>Accelerometer.cs</Link>
85+
</Compile>
86+
<Compile Include="..\AssemblyInfo.cs">
87+
<Link>AssemblyInfo.cs</Link>
88+
</Compile>
89+
<Compile Include="..\DepthCamera.cs">
90+
<Link>DepthCamera.cs</Link>
91+
</Compile>
92+
<Compile Include="..\Kinect.cs">
93+
<Link>Kinect.cs</Link>
94+
</Compile>
95+
<Compile Include="..\KinectNative.cs">
96+
<Link>KinectNative.cs</Link>
97+
</Compile>
98+
<Compile Include="..\Motor.cs">
99+
<Link>Motor.cs</Link>
100+
</Compile>
101+
<Compile Include="..\LED.cs">
102+
<Link>LED.cs</Link>
103+
</Compile>
104+
<Compile Include="..\LogEventArgs.cs">
105+
<Link>LogEventArgs.cs</Link>
106+
</Compile>
107+
<Compile Include="..\DepthMap.cs">
108+
<Link>DepthMap.cs</Link>
109+
</Compile>
110+
<Compile Include="..\ImageMap.cs">
111+
<Link>ImageMap.cs</Link>
112+
</Compile>
113+
<Compile Include="..\VideoCamera.cs">
114+
<Link>VideoCamera.cs</Link>
115+
</Compile>
116+
<Compile Include="..\SwapBufferCollection.cs">
117+
<Link>SwapBufferCollection.cs</Link>
118+
</Compile>
119+
<Compile Include="..\BaseCamera.cs">
120+
<Link>BaseCamera.cs</Link>
121+
</Compile>
122+
<Compile Include="..\BaseDataMap.cs">
123+
<Link>BaseDataMap.cs</Link>
124+
</Compile>
125+
<Compile Include="..\DepthFrameMode.cs">
126+
<Link>DepthFrameMode.cs</Link>
127+
</Compile>
128+
<Compile Include="..\Enumerations.cs">
129+
<Link>Enumerations.cs</Link>
130+
</Compile>
131+
<Compile Include="..\FrameMode.cs">
132+
<Link>FrameMode.cs</Link>
133+
</Compile>
134+
<Compile Include="..\VideoFrameMode.cs">
135+
<Link>VideoFrameMode.cs</Link>
136+
</Compile>
137+
</ItemGroup>
138+
<ItemGroup>
139+
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
140+
<Visible>False</Visible>
141+
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
142+
<Install>false</Install>
143+
</BootstrapperPackage>
144+
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
145+
<Visible>False</Visible>
146+
<ProductName>.NET Framework 3.5 SP1</ProductName>
147+
<Install>true</Install>
148+
</BootstrapperPackage>
149+
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
150+
<Visible>False</Visible>
151+
<ProductName>Windows Installer 3.1</ProductName>
152+
<Install>true</Install>
153+
</BootstrapperPackage>
154+
</ItemGroup>
155+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
134156
</Project>
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11

22
Microsoft Visual Studio Solution File, Format Version 11.00
3-
# Visual Studio 2010
3+
# Visual C# Express 2010
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "freenectdotnet", "freenectdotnet.csproj", "{360413F9-4D9B-46BE-BEC7-9B666850ED8C}"
55
EndProject
66
Global
77
GlobalSection(SolutionConfigurationPlatforms) = preSolution
88
Debug|Any CPU = Debug|Any CPU
9+
Debug|x64 = Debug|x64
910
Release|Any CPU = Release|Any CPU
11+
Release|x64 = Release|x64
1012
EndGlobalSection
1113
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1214
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1315
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Debug|x64.ActiveCfg = Debug|x64
17+
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Debug|x64.Build.0 = Debug|x64
1418
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Release|Any CPU.ActiveCfg = Release|Any CPU
1519
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Release|Any CPU.Build.0 = Release|Any CPU
16-
EndGlobalSection
17-
GlobalSection(MonoDevelopProperties) = preSolution
18-
StartupItem = freenectdotnet.csproj
20+
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Release|x64.ActiveCfg = Release|x64
21+
{360413F9-4D9B-46BE-BEC7-9B666850ED8C}.Release|x64.Build.0 = Release|x64
1922
EndGlobalSection
2023
GlobalSection(SolutionProperties) = preSolution
2124
HideSolutionNode = FALSE
2225
EndGlobalSection
26+
GlobalSection(MonoDevelopProperties) = preSolution
27+
StartupItem = freenectdotnet.csproj
28+
EndGlobalSection
2329
EndGlobal

wrappers/csharp/src/test/ConsoleTest/Main.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ public static void Main (string[] args)
6363

6464
// Try to set LED colors
6565
Console.WriteLine(" - LED Testing");
66-
string[] colors = Enum.GetNames(typeof(LED.ColorOption));
66+
string[] colors = Enum.GetNames(typeof(LEDColor));
6767
foreach(string color in colors)
68-
{
69-
var c = (LED.ColorOption)Enum.Parse(typeof(LED.ColorOption), color);
68+
{
69+
var c = (LEDColor)Enum.Parse(typeof(LEDColor), color);
7070
Console.WriteLine("\t - Setting LED to Color: " + color);
7171
k.LED.Color = c;
7272
Thread.Sleep(3000);
@@ -91,7 +91,10 @@ public static void Main (string[] args)
9191
}
9292

9393
// Shutdown the Kinect context
94-
Kinect.Shutdown();
94+
Kinect.Shutdown();
95+
96+
// Pause...
97+
Console.ReadKey(true);
9598
}
9699
}
97100
}

0 commit comments

Comments
 (0)