# HG changeset patch # User moel.mich # Date 1338212738 0 # Node ID d389607e74ca9eabea35f6c6f2229dca259efa52 # Parent 6de77245e32b6da4d68b55e630bf7a3780340c03 Added support for reading more than one TBalancer fan controller. diff -r 6de77245e32b -r d389607e74ca Hardware/TBalancer/TBalancerGroup.cs --- a/Hardware/TBalancer/TBalancerGroup.cs Mon May 28 10:39:30 2012 +0000 +++ b/Hardware/TBalancer/TBalancerGroup.cs Mon May 28 13:45:38 2012 +0000 @@ -4,7 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. - Copyright (C) 2009-2010 Michael Möller + Copyright (C) 2009-2012 Michael Möller */ @@ -32,14 +32,14 @@ catch (ArgumentNullException) { return; } catch (EntryPointNotFoundException) { return; } catch (BadImageFormatException) { return; } - + FT_DEVICE_INFO_NODE[] info = new FT_DEVICE_INFO_NODE[numDevices]; if (FTD2XX.FT_GetDeviceInfoList(info, ref numDevices) != FT_STATUS.FT_OK) { report.AppendLine("Status: FT_GetDeviceInfoList failed"); return; } - + // make sure numDevices is not larger than the info array if (numDevices > info.Length) numDevices = (uint)info.Length; @@ -121,10 +121,11 @@ if (isValid) { report.AppendLine("Status: OK"); - hardware.Add(new TBalancer(i, protocolVersion, settings)); - return; + hardware.Add(new TBalancer(i, protocolVersion, settings)); } - report.AppendLine(); + + if (i < numDevices - 1) + report.AppendLine(); } } diff -r 6de77245e32b -r d389607e74ca Properties/AssemblyVersion.cs --- a/Properties/AssemblyVersion.cs Mon May 28 10:39:30 2012 +0000 +++ b/Properties/AssemblyVersion.cs Mon May 28 13:45:38 2012 +0000 @@ -10,5 +10,5 @@ using System.Reflection; -[assembly: AssemblyVersion("0.4.0.5")] -[assembly: AssemblyInformationalVersion("0.4.0.5 Alpha")] \ No newline at end of file +[assembly: AssemblyVersion("0.4.0.8")] +[assembly: AssemblyInformationalVersion("0.4.0.8 Alpha")] \ No newline at end of file