diff --git a/MultiChannelDemo/Properties/AssemblyInfo.cs b/MultiChannelDemo/Properties/AssemblyInfo.cs index 2f8a833..0e25fac 100644 --- a/MultiChannelDemo/Properties/AssemblyInfo.cs +++ b/MultiChannelDemo/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.5.23.0")] -[assembly: AssemblyFileVersion("2.5.23.0")] +[assembly: AssemblyVersion("2.5.25.0")] +[assembly: AssemblyFileVersion("2.5.25.0")] diff --git a/README_CHANGELOG.md b/README_CHANGELOG.md index fbd9b09..b1b1883 100644 --- a/README_CHANGELOG.md +++ b/README_CHANGELOG.md @@ -1,4 +1,9 @@ # Wasatch.NET Changelog +- 2026-07-XX 2.5.25 + - more EEPROM fixes + - fix for sensor state logic to differentiate return code from no response state +- 2026-07-XX 2.5.24 + - fixes from more recent EEPROM formats for subtype spectrometers (motivated by SPI issues) - 2026-06-30 2.5.23 - implemented additions for EEPROM format 19 - 2026-06-23 2.5.22 diff --git a/Setup32/Setup32.vdproj b/Setup32/Setup32.vdproj index 1845b80..65717c4 100644 --- a/Setup32/Setup32.vdproj +++ b/Setup32/Setup32.vdproj @@ -905,7 +905,7 @@ { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.23.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.25.0, Culture=neutral, processorArchitecture=x86" "ScatterAssemblies" { "_DCF75BC1804A619A064601AF06CE25ED" @@ -1127,15 +1127,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Wasatch.NET" - "ProductCode" = "8:{1D27AC50-B0C1-4D10-8BDD-2D4E3DA3033C}" - "PackageCode" = "8:{3CA0A64C-59C7-420B-A8C1-E593BCAED9CE}" + "ProductCode" = "8:{BFC23130-F387-48A8-B7B3-C514890657C8}" + "PackageCode" = "8:{D3255884-A5CD-4CA8-92C4-D40F79A8D4D8}" "UpgradeCode" = "8:{F46C8BF0-A35E-4D7F-A611-252DBD4C6D58}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:2.5.23" + "ProductVersion" = "8:2.5.25" "Manufacturer" = "8:Wasatch Photonics" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:http://wasatchphotonics.com" diff --git a/Setup64/Setup64.vdproj b/Setup64/Setup64.vdproj index b926cdb..7b88243 100644 --- a/Setup64/Setup64.vdproj +++ b/Setup64/Setup64.vdproj @@ -57,86 +57,86 @@ } "Entry" { - "MsmKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" "OwnerKey" = "8:_9EB1036A6CD14286A5CBAF7CEAD65B9D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_4E44E53C7D476301A806078F142245E4" - "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" + "MsmKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_4E44E53C7D476301A806078F142245E4" - "OwnerKey" = "8:_9EB1036A6CD14286A5CBAF7CEAD65B9D" + "MsmKey" = "8:_50D57D68FE0982E4EA21F1C03F9B8367" + "OwnerKey" = "8:_E1F2580EC8074E01AC816BF55ADB9F98" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_4E44E53C7D476301A806078F142245E4" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_52CFDA8A7C0B4DB89BE0F90F536EE3C5" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_50D57D68FE0982E4EA21F1C03F9B8367" - "OwnerKey" = "8:_E1F2580EC8074E01AC816BF55ADB9F98" + "MsmKey" = "8:_632F72ACA795151DD5E5534A75DE76AB" + "OwnerKey" = "8:_1FC0D298E09BC6197366270DCE5744CC" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_52CFDA8A7C0B4DB89BE0F90F536EE3C5" + "MsmKey" = "8:_656F6B7CE54F4D41814FFB87D3079B01" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" - "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" + "MsmKey" = "8:_677E97220D5A4759820787D4D525362C" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" - "OwnerKey" = "8:_E1F2580EC8074E01AC816BF55ADB9F98" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" + "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" - "OwnerKey" = "8:_9EB1036A6CD14286A5CBAF7CEAD65B9D" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" + "OwnerKey" = "8:_E1F2580EC8074E01AC816BF55ADB9F98" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" + "OwnerKey" = "8:_9EB1036A6CD14286A5CBAF7CEAD65B9D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_632F72ACA795151DD5E5534A75DE76AB" - "OwnerKey" = "8:_1FC0D298E09BC6197366270DCE5744CC" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_656F6B7CE54F4D41814FFB87D3079B01" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" + "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_677E97220D5A4759820787D4D525362C" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" + "OwnerKey" = "8:_9EB1036A6CD14286A5CBAF7CEAD65B9D" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -172,7 +172,7 @@ "Entry" { "MsmKey" = "8:_B4B0ADD367E0101F55700AB0A76158B6" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -232,7 +232,7 @@ "Entry" { "MsmKey" = "8:_C8A5CBBE0D3D3478A0B1FFE74887A738" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -316,19 +316,19 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" + "OwnerKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_4E44E53C7D476301A806078F142245E4" + "OwnerKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -586,20 +586,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3F47F3126AEBD059FEFE475972081DB3" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4B17E5F7E35E02EFA165C82469C430E9" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.22.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_3F47F3126AEBD059FEFE475972081DB3" + "_4B17E5F7E35E02EFA165C82469C430E9" { - "Name" = "8:WasatchNET.dll" + "Name" = "8:ATMCD64CS.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:WasatchNET.dll" + "SourcePath" = "8:ATMCD64CS.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" @@ -617,23 +617,23 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4E44E53C7D476301A806078F142245E4" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_50D57D68FE0982E4EA21F1C03F9B8367" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ATMCD32CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_4E44E53C7D476301A806078F142245E4" + "_50D57D68FE0982E4EA21F1C03F9B8367" { - "Name" = "8:ATMCD32CS.dll" + "Name" = "8:ATMCD64CS.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:ATMCD32CS.dll" + "SourcePath" = "8:ATMCD64CS.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" + "Folder" = "8:_A35CBBE5781F485EBC28659A8EE6F7C3" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -648,23 +648,23 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_50D57D68FE0982E4EA21F1C03F9B8367" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_52CFDA8A7C0B4DB89BE0F90F536EE3C5" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_50D57D68FE0982E4EA21F1C03F9B8367" + "_52CFDA8A7C0B4DB89BE0F90F536EE3C5" { "Name" = "8:ATMCD64CS.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:ATMCD64CS.dll" + "SourcePath" = "8:..\\lib\\x64\\ATMCD64CS.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_A35CBBE5781F485EBC28659A8EE6F7C3" + "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -676,24 +676,13 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_52CFDA8A7C0B4DB89BE0F90F536EE3C5" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_677E97220D5A4759820787D4D525362C" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" - "ScatterAssemblies" - { - "_52CFDA8A7C0B4DB89BE0F90F536EE3C5" - { - "Name" = "8:ATMCD64CS.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:..\\lib\\x64\\ATMCD64CS.dll" - "TargetName" = "8:" + "SourcePath" = "8:..\\scripts\\RegisterDLL64.bat" + "TargetName" = "8:RegisterDLL64.bat" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" "Condition" = "8:" @@ -710,14 +699,14 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5D709C998A0A588CF3BBD60956A905D9" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6F9127E362FACAE7D5F76EEF705C4373" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" "AssemblyAsmDisplayName" = "8:LibUsbDotNet, Version=2.2.9.110, Culture=neutral, PublicKeyToken=4ff3096b5885de04, processorArchitecture=MSIL" "ScatterAssemblies" { - "_5D709C998A0A588CF3BBD60956A905D9" + "_6F9127E362FACAE7D5F76EEF705C4373" { "Name" = "8:LibUsbDotNet.dll" "Attributes" = "3:512" @@ -741,10 +730,21 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_677E97220D5A4759820787D4D525362C" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7B9416FC2CD0F72D2E2110A8031F55CF" { - "SourcePath" = "8:..\\scripts\\RegisterDLL64.bat" - "TargetName" = "8:RegisterDLL64.bat" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.25.0, Culture=neutral, processorArchitecture=AMD64" + "ScatterAssemblies" + { + "_7B9416FC2CD0F72D2E2110A8031F55CF" + { + "Name" = "8:WasatchNET.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:WasatchNET.dll" + "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" "Condition" = "8:" @@ -758,7 +758,7 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A270A2A775B44986A1035502BF78C66B" @@ -1149,15 +1149,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Wasatch.NET" - "ProductCode" = "8:{163D8BA2-E0C9-4F06-A581-CF7D26A33327}" - "PackageCode" = "8:{FB211B01-A1AC-401A-9669-4D72E5EED870}" + "ProductCode" = "8:{648648CE-502B-4D65-ACC7-E0D15E7BFF1C}" + "PackageCode" = "8:{53F4D18B-71A2-442A-A830-A2B4E40BF30C}" "UpgradeCode" = "8:{F312F3F0-86DD-4C2E-9E98-0648164C24CC}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:2.5.23" + "ProductVersion" = "8:2.5.25" "Manufacturer" = "8:Wasatch Photonics" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:http://wasatchphotonics.com" @@ -1685,7 +1685,7 @@ { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2FE9422665DA4602AB00AC7F850BB05C" { - "SourcePath" = "8:..\\WinFormDemo\\obj\\x86\\Debug\\WinFormDemo.exe" + "SourcePath" = "8:..\\WinFormDemo\\obj\\x64\\Debug\\WinFormDemo.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" @@ -1713,7 +1713,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_9EB1036A6CD14286A5CBAF7CEAD65B9D" { - "SourcePath" = "8:..\\MultiChannelDemo\\obj\\x86\\Debug\\MultiChannelDemo.exe" + "SourcePath" = "8:..\\MultiChannelDemo\\obj\\x64\\Debug\\MultiChannelDemo.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" diff --git a/SetupAnyCPU/SetupAnyCPU.vdproj b/SetupAnyCPU/SetupAnyCPU.vdproj index 2915c87..0205972 100644 --- a/SetupAnyCPU/SetupAnyCPU.vdproj +++ b/SetupAnyCPU/SetupAnyCPU.vdproj @@ -45,20 +45,14 @@ } "Entry" { - "MsmKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_4E44E53C7D476301A806078F142245E4" - "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_4E44E53C7D476301A806078F142245E4" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -69,20 +63,20 @@ } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" "OwnerKey" = "8:_E1F2580EC8074E01AC816BF55ADB9F98" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "MsmKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -93,6 +87,12 @@ } "Entry" { + "MsmKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" + "OwnerKey" = "8:_2FE9422665DA4602AB00AC7F850BB05C" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_A270A2A775B44986A1035502BF78C66B" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -118,7 +118,7 @@ "Entry" { "MsmKey" = "8:_B4B0ADD367E0101F55700AB0A76158B6" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -166,7 +166,7 @@ "Entry" { "MsmKey" = "8:_C8A5CBBE0D3D3478A0B1FFE74887A738" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -226,19 +226,19 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_3F47F3126AEBD059FEFE475972081DB3" + "OwnerKey" = "8:_7B9416FC2CD0F72D2E2110A8031F55CF" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5D709C998A0A588CF3BBD60956A905D9" + "OwnerKey" = "8:_6F9127E362FACAE7D5F76EEF705C4373" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_4E44E53C7D476301A806078F142245E4" + "OwnerKey" = "8:_4B17E5F7E35E02EFA165C82469C430E9" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -451,20 +451,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_3F47F3126AEBD059FEFE475972081DB3" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4B17E5F7E35E02EFA165C82469C430E9" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.22.0, Culture=neutral, processorArchitecture=x86" + "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_3F47F3126AEBD059FEFE475972081DB3" + "_4B17E5F7E35E02EFA165C82469C430E9" { - "Name" = "8:WasatchNET.dll" + "Name" = "8:ATMCD64CS.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:WasatchNET.dll" + "SourcePath" = "8:ATMCD64CS.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" @@ -482,23 +482,23 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4E44E53C7D476301A806078F142245E4" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_50D57D68FE0982E4EA21F1C03F9B8367" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ATMCD32CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_4E44E53C7D476301A806078F142245E4" + "_50D57D68FE0982E4EA21F1C03F9B8367" { - "Name" = "8:ATMCD32CS.dll" + "Name" = "8:ATMCD64CS.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:ATMCD32CS.dll" + "SourcePath" = "8:ATMCD64CS.dll" "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" + "Folder" = "8:_A35CBBE5781F485EBC28659A8EE6F7C3" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -513,23 +513,12 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_50D57D68FE0982E4EA21F1C03F9B8367" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_677E97220D5A4759820787D4D525362C" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ATMCD64CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=AMD64" - "ScatterAssemblies" - { - "_50D57D68FE0982E4EA21F1C03F9B8367" - { - "Name" = "8:ATMCD64CS.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:ATMCD64CS.dll" - "TargetName" = "8:" + "SourcePath" = "8:..\\scripts\\RegisterDLL64.bat" + "TargetName" = "8:RegisterDLL64.bat" "Tag" = "8:" - "Folder" = "8:_A35CBBE5781F485EBC28659A8EE6F7C3" + "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -541,17 +530,17 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5D709C998A0A588CF3BBD60956A905D9" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6F9127E362FACAE7D5F76EEF705C4373" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" "AssemblyAsmDisplayName" = "8:LibUsbDotNet, Version=2.2.9.110, Culture=neutral, PublicKeyToken=4ff3096b5885de04, processorArchitecture=MSIL" "ScatterAssemblies" { - "_5D709C998A0A588CF3BBD60956A905D9" + "_6F9127E362FACAE7D5F76EEF705C4373" { "Name" = "8:LibUsbDotNet.dll" "Attributes" = "3:512" @@ -575,10 +564,21 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_677E97220D5A4759820787D4D525362C" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7551ED76CF0F45E1A6AE15CDFC7F00D6" { - "SourcePath" = "8:..\\scripts\\RegisterDLL64.bat" - "TargetName" = "8:RegisterDLL64.bat" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:ATMCD32CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_7551ED76CF0F45E1A6AE15CDFC7F00D6" + { + "Name" = "8:ATMCD32CS.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:..\\lib\\x86\\ATMCD32CS.dll" + "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" "Condition" = "8:" @@ -595,20 +595,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7551ED76CF0F45E1A6AE15CDFC7F00D6" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7B9416FC2CD0F72D2E2110A8031F55CF" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ATMCD32CS, Version=2.104.30000.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:WasatchNET, Version=2.5.25.0, Culture=neutral, processorArchitecture=AMD64" "ScatterAssemblies" { - "_7551ED76CF0F45E1A6AE15CDFC7F00D6" + "_7B9416FC2CD0F72D2E2110A8031F55CF" { - "Name" = "8:ATMCD32CS.dll" + "Name" = "8:WasatchNET.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:..\\lib\\x86\\ATMCD32CS.dll" + "SourcePath" = "8:WasatchNET.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" @@ -623,7 +623,7 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A270A2A775B44986A1035502BF78C66B" @@ -983,15 +983,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Wasatch.NET" - "ProductCode" = "8:{C7B129FA-B70C-45FF-86B0-8D7F3FEFBFBC}" - "PackageCode" = "8:{5B8DCB59-185A-4BA0-898B-48D93468BF23}" + "ProductCode" = "8:{0D9E28E4-0B61-471B-852B-F5BC41D68BB7}" + "PackageCode" = "8:{84EAFEDD-9426-420C-A956-CA14A27A66DC}" "UpgradeCode" = "8:{F312F3F0-86DD-4C2E-9E98-0648164C24CC}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:FALSE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:2.5.23" + "ProductVersion" = "8:2.5.25" "Manufacturer" = "8:Wasatch Photonics" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:http://wasatchphotonics.com" @@ -1519,7 +1519,7 @@ { "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_2FE9422665DA4602AB00AC7F850BB05C" { - "SourcePath" = "8:..\\WinFormDemo\\obj\\x86\\Debug\\WinFormDemo.exe" + "SourcePath" = "8:..\\WinFormDemo\\obj\\x64\\Debug\\WinFormDemo.exe" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_6646C110E914486EA00871FD2D0AAC2E" @@ -1547,7 +1547,7 @@ } "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E1F2580EC8074E01AC816BF55ADB9F98" { - "SourcePath" = "8:..\\WasatchNET\\obj\\x86\\Debug\\WasatchNET.dll" + "SourcePath" = "8:" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A35CBBE5781F485EBC28659A8EE6F7C3" diff --git a/WasatchNET/AndorEEPROM.cs b/WasatchNET/AndorEEPROM.cs index 0dea4b8..3ee1350 100644 --- a/WasatchNET/AndorEEPROM.cs +++ b/WasatchNET/AndorEEPROM.cs @@ -44,6 +44,7 @@ internal AndorEEPROM(AndorSpectrometer spec) : base(spec) linearityCoeffs = new float[5]; laserPowerCoeffs = new float[4]; intensityCorrectionCoeffs = new float[12]; + assemblyRevision = new byte[6]; badPixelList = new List(); badPixelSet = new SortedSet(); diff --git a/WasatchNET/AndorSpectrometer.cs b/WasatchNET/AndorSpectrometer.cs index b687b51..b8fddd0 100644 --- a/WasatchNET/AndorSpectrometer.cs +++ b/WasatchNET/AndorSpectrometer.cs @@ -595,6 +595,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort detectorTECSetpointRaw { get diff --git a/WasatchNET/BoulderEEPROM.cs b/WasatchNET/BoulderEEPROM.cs index c289e42..a695464 100644 --- a/WasatchNET/BoulderEEPROM.cs +++ b/WasatchNET/BoulderEEPROM.cs @@ -23,6 +23,7 @@ internal BoulderEEPROM(BoulderSpectrometer spec) : base(spec) linearityCoeffs = new float[5]; laserPowerCoeffs = new float[4]; intensityCorrectionCoeffs = new float[12]; + assemblyRevision = new byte[6]; badPixelList = new List(); badPixelSet = new SortedSet(); diff --git a/WasatchNET/BoulderSpectrometer.cs b/WasatchNET/BoulderSpectrometer.cs index c37f41a..83765ff 100644 --- a/WasatchNET/BoulderSpectrometer.cs +++ b/WasatchNET/BoulderSpectrometer.cs @@ -935,6 +935,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort detectorTECSetpointRaw { get diff --git a/WasatchNET/EEPROM.cs b/WasatchNET/EEPROM.cs index 972874d..bae4cc8 100644 --- a/WasatchNET/EEPROM.cs +++ b/WasatchNET/EEPROM.cs @@ -692,7 +692,7 @@ public float[] linearityCoeffs // public short laserTemperatureMax { get; private set; } // public short laserTemperatureMin { get; private set; } - public byte maxLaserTempDegC + public sbyte maxLaserTempDegC { get { return _maxLaserTempDegC; } set @@ -702,7 +702,7 @@ public byte maxLaserTempDegC handler?.Invoke(this, new EventArgs()); } } - byte _maxLaserTempDegC; + sbyte _maxLaserTempDegC; public float maxLaserPowerMW @@ -827,6 +827,17 @@ public HORIZONTAL_BINNING_METHOD horizontalBinningMethod } HORIZONTAL_BINNING_METHOD _horizontalBinningMethod = HORIZONTAL_BINNING_METHOD.BIN_2X2; + public byte startupScansToAverage + { + get { return _startupScansToAverage; } + set + { + _startupScansToAverage = value; + EEPROMChanged?.Invoke(this, new EventArgs()); + } + } + byte _startupScansToAverage; + public byte laserDacAttenuation { get { return _laserDacAttenuation; } @@ -1262,17 +1273,6 @@ public UInt16 libraryID } UInt16 _libraryID; - public byte startupScansToAverage - { - get { return _startupScansToAverage; } - set - { - _startupScansToAverage = value; - EEPROMChanged?.Invoke(this, new EventArgs()); - } - } - byte _startupScansToAverage; - public byte matchingMinRampPixels { get { return _matchingMinRampPixels; } @@ -1442,7 +1442,7 @@ public ushort accessoryStrobeCount } ushort _accessoryStrobeCount; - public byte maxBatteryTempDegC + public sbyte maxBatteryTempDegC { get { return _maxBatteryTempDegC; } set @@ -1452,7 +1452,7 @@ public byte maxBatteryTempDegC handler?.Invoke(this, new EventArgs()); } } - byte _maxBatteryTempDegC = 0; + sbyte _maxBatteryTempDegC = 0; public PIXEL_CALIBRATION_TYPE pixelCalibrationType { @@ -1721,7 +1721,7 @@ internal EEPROM(Spectrometer spec) badPixelList = new List(); badPixelSet = new SortedSet(); - if (spec.isFX2) + if (spec.isFX2 || spec is SPISpectrometer) useFX2Limit = true; else useFX2Limit = false; @@ -1931,13 +1931,26 @@ public virtual async Task readAsync(bool skipRead = false) maxIntegrationTimeMS = ParseData.toUInt32(pages[3], 44); } + if (format >= 17) + { + startupScansToAverage = ParseData.toUInt8(pages[3], 60); + } + else + { + startupScansToAverage = 1; + } + if (format >= 18) { - maxLaserTempDegC = ParseData.toUInt8(pages[3], 11); + maxLaserTempDegC = ParseData.toInt8(pages[3], 11); + } + else + { + maxLaserTempDegC = 60; } - userData = format < 4 ? new byte[63] : new byte[64]; + userData = format < 4 ? new byte[63] : new byte[64]; Array.Copy(pages[4], userData, userData.Length); badPixelSet = new SortedSet(); @@ -2044,7 +2057,7 @@ public virtual async Task readAsync(bool skipRead = false) } else { - powerWatchdogTimer = 0; + powerWatchdogTimer = 300; detectorTimeout = 0; horizontalBinningMethod = HORIZONTAL_BINNING_METHOD.BIN_2X2; } @@ -2085,7 +2098,6 @@ public virtual async Task readAsync(bool skipRead = false) logger.debug("loading untethered device configuration"); libraryType = ParseData.toUInt8(pages[7], 0); libraryID = ParseData.toUInt16(pages[7], 1); - startupScansToAverage = ParseData.toUInt8(pages[7], 3); matchingMinRampPixels = ParseData.toUInt8(pages[7], 4); matchingMinPeakHeight = ParseData.toUInt16(pages[7], 5); matchingThreshold = ParseData.toUInt8(pages[7], 7); @@ -2154,7 +2166,7 @@ public virtual async Task readAsync(bool skipRead = false) accessoryStrobeWidthMicroSec = ParseData.toUInt32(pages[8], 28); accessoryStrobeDelayMicroSec = ParseData.toUInt32(pages[8], 32); accessoryStrobeCount = ParseData.toUInt16(pages[8], 36); - maxBatteryTempDegC = ParseData.toUInt8(pages[8], 38); + maxBatteryTempDegC = ParseData.toInt8(pages[8], 38); pixelCalibrationType = (PIXEL_CALIBRATION_TYPE)ParseData.toUInt8(pages[8], 39); usbMfgName = ParseData.toString(pages[8], 40, 20); auxButtonFunction = (AUX_BUTTON_FUNCTION)ParseData.toUInt8(pages[8], 60); @@ -2180,6 +2192,11 @@ public virtual async Task readAsync(bool skipRead = false) } } } + else if (pages.Count >= 9) + { + maxBatteryTempDegC = 60; + } + } catch (Exception ex) { @@ -2401,6 +2418,7 @@ public void setFromJSON(EEPROMJSON json) minLaserPowerMW = (float)json.MinLaserPowerMW; laserWarmupSec = json.LaserWarmupS; laserExcitationWavelengthNMFloat = (float)json.ExcitationWavelengthNM; + startupScansToAverage = json.StartupScansToAvg; laserDacAttenuation = json.LaserDACAttenuation; avgResolution = (float)json.AvgResolution; @@ -2494,9 +2512,18 @@ public void setFromJSON(EEPROMJSON json) laserPassword = json.LaserPassword; usbMfgName = json.USBMfgName; + accessoryState = json.AccessoryState; + accessoryGPIO1State = json.AccessoryGPIO1State; + accessoryGPIO2State = json.AccessoryGPIO2State; + accessoryStrobePeriodMicroSec = json.AccessoryStrobePeriodUS; + accessoryStrobeWidthMicroSec = json.AccessoryStrobeWidthUS; + accessoryStrobeDelayMicroSec = json.AccessoryStrobeDelayUS; + accessoryStrobeCount = json.AccessoryStrobeCount; + maxBatteryTempDegC = json.MaxBatteryTempDegC; + auxButtonFunction = (AUX_BUTTON_FUNCTION)json.AuxButtonFunction; + auxButtonParameter = json.AuxButtonParameter; pixelCalibrationType = (PIXEL_CALIBRATION_TYPE)json.PixelCalibrationType; - maxLaserTempDegC = json.MaxLaserTempDegC; if (json.PixelCalibrationFactors != null) { pixelCalibrationFactors = new List(json.PixelCalibrationFactors); @@ -2599,6 +2626,7 @@ public EEPROMJSON toJSON() json.MaxLaserPowerMW = maxLaserPowerMW; json.MinLaserPowerMW = minLaserPowerMW; json.ExcitationWavelengthNM = laserExcitationWavelengthNMFloat; + json.StartupScansToAvg = startupScansToAverage; json.LaserDACAttenuation = laserDacAttenuation; json.AvgResolution = avgResolution; json.BadPixels = new int[15]; @@ -2713,6 +2741,16 @@ public EEPROMJSON toJSON() json.LaserPassword = laserPassword; json.USBMfgName = usbMfgName; + json.AccessoryState = accessoryState; + json.AccessoryGPIO1State = accessoryGPIO1State; + json.AccessoryGPIO2State = accessoryGPIO2State; + json.AccessoryStrobePeriodUS = accessoryStrobePeriodMicroSec; + json.AccessoryStrobeWidthUS = accessoryStrobeWidthMicroSec; + json.AccessoryStrobeDelayUS = accessoryStrobeDelayMicroSec; + json.AccessoryStrobeCount = accessoryStrobeCount; + json.MaxBatteryTempDegC = maxBatteryTempDegC; + json.AuxButtonFunction = (byte)auxButtonFunction; + json.AuxButtonParameter = auxButtonParameter; json.PixelCalibrationFactors = pixelCalibrationFactors?.ToArray(); json.PixelCalibrationType = (byte)pixelCalibrationType; json.MaxLaserPowerMW = maxLaserPowerMW; @@ -2869,6 +2907,7 @@ protected bool writeParse() if (!ParseData.writeInt16(detectorOffsetOdd, pages[0], 58)) return false; if (format >= 16) if (!ParseData.writeUInt16(laserTECSetpoint, pages[0], 60)) return false; + pages[0][63] = format; if (!ParseData.writeFloat(wavecalCoeffs[0], pages[1], 0)) return false; if (!ParseData.writeFloat(wavecalCoeffs[1], pages[1], 4)) return false; @@ -2938,9 +2977,13 @@ protected bool writeParse() if (!ParseData.writeUInt16(detectorTimeout, pages[3], 57)) return false; if (!ParseData.writeByte((byte)horizontalBinningMethod, pages[3], 59)) return false; } + if (format >= 17) + { + if (!ParseData.writeByte(startupScansToAverage, pages[3], 60)) return false; + } if (format >= 18) { - if (!ParseData.writeByte(maxLaserTempDegC, pages[3], 11)) return false; + if (!ParseData.writeInt8(maxLaserTempDegC, pages[3], 11)) return false; if (!ParseData.writeByte(laserDacAttenuation, pages[3], 61)) return false; Array.Copy(assemblyRevision, 0, pages[5], 46, assemblyRevision.Length); @@ -2959,7 +3002,7 @@ protected bool writeParse() if (!ParseData.writeUInt32(accessoryStrobeWidthMicroSec, pages[8], 28)) return false; if (!ParseData.writeUInt32(accessoryStrobeDelayMicroSec, pages[8], 32)) return false; if (!ParseData.writeUInt16(accessoryStrobeCount, pages[8], 36)) return false; - if (!ParseData.writeByte(maxBatteryTempDegC, pages[8], 38)) return false; + if (!ParseData.writeInt8(maxBatteryTempDegC, pages[8], 38)) return false; if (!ParseData.writeByte((byte)pixelCalibrationType, pages[8], 39)) return false; if (!ParseData.writeString(usbMfgName, pages[8], 40, 20)) return false; if (!ParseData.writeByte((byte)auxButtonFunction, pages[8], 60)) return false; @@ -3059,7 +3102,6 @@ protected bool writeParse() { if (!ParseData.writeByte(libraryType, pages[7], 0)) return false; if (!ParseData.writeUInt16(libraryID, pages[7], 1)) return false; - if (!ParseData.writeByte(startupScansToAverage, pages[7], 3)) return false; if (!ParseData.writeByte(matchingMinRampPixels, pages[7], 4)) return false; if (!ParseData.writeUInt16(matchingMinPeakHeight, pages[7], 5)) return false; if (!ParseData.writeByte(matchingThreshold, pages[7], 7)) return false; @@ -3125,8 +3167,6 @@ protected bool writeParse() } } - pages[0][63] = format; - return true; } diff --git a/WasatchNET/EEPROMJSON.cs b/WasatchNET/EEPROMJSON.cs index 2b65107..a48c45b 100644 --- a/WasatchNET/EEPROMJSON.cs +++ b/WasatchNET/EEPROMJSON.cs @@ -42,6 +42,7 @@ public class EEPROMJSON public int LaserWatchdogTimer; public int PowerWatchdogTimer; public int DetectorTimeout; + public byte StartupScansToAvg; public byte LaserDACAttenuation; public byte LightSourceType; public byte HorizontalBinningMethod; @@ -49,7 +50,7 @@ public class EEPROMJSON public int ROIHorizEnd; public int[] ROIVertRegionStarts; public int[] ROIVertRegionEnds; - public byte MaxLaserTempDegC; + public sbyte MaxLaserTempDegC; public double[] LaserPowerCoeffs; public double MaxLaserPowerMW; public double MinLaserPowerMW; @@ -90,7 +91,7 @@ public class EEPROMJSON public uint AccessoryStrobeWidthUS; public uint AccessoryStrobeDelayUS; public ushort AccessoryStrobeCount; - public byte MaxBatteryTempDegC; + public sbyte MaxBatteryTempDegC; public byte PixelCalibrationType; public string USBMfgName; public byte AuxButtonFunction; @@ -190,6 +191,8 @@ public override bool Equals(object obj) return false; if (item.DetectorTimeout != this.DetectorTimeout) return false; + if (item.StartupScansToAvg != this.StartupScansToAvg) + return false; if (item.LaserDACAttenuation != this.LaserDACAttenuation) return false; if (item.LightSourceType != this.LightSourceType) @@ -448,6 +451,7 @@ public override int GetHashCode() hashCode = hashCode * -1521134295 + MinIntegrationTimeMS.GetHashCode(); hashCode = hashCode * -1521134295 + MaxIntegrationTimeMS.GetHashCode(); hashCode = hashCode * -1521134295 + MaxLaserTempDegC.GetHashCode(); + hashCode = hashCode * -1521134295 + StartupScansToAvg.GetHashCode(); hashCode = hashCode * -1521134295 + LaserDACAttenuation.GetHashCode(); hashCode = hashCode * -1521134295 + LaserWatchdogTimer.GetHashCode(); hashCode = hashCode * -1521134295 + PowerWatchdogTimer.GetHashCode(); @@ -576,6 +580,7 @@ public string ToString(int level, int indentSize = 2) addField(sb, indent, "LaserWatchdogTimer", LaserWatchdogTimer); addField(sb, indent, "PowerWatchdogTimer", PowerWatchdogTimer); addField(sb, indent, "DetectorTimeout", DetectorTimeout); + addField(sb, indent, "StartupScansToAvg", StartupScansToAvg); addField(sb, indent, "LaserDACAttenuation", LaserDACAttenuation); addField(sb, indent, "LightSourceType", LightSourceType); addField(sb, indent, "HorizontalBinningMethod", HorizontalBinningMethod); diff --git a/WasatchNET/HOCTSpectrometer.cs b/WasatchNET/HOCTSpectrometer.cs index d1ed9e1..4274222 100644 --- a/WasatchNET/HOCTSpectrometer.cs +++ b/WasatchNET/HOCTSpectrometer.cs @@ -1274,6 +1274,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort detectorTECSetpointRaw { get diff --git a/WasatchNET/ISpectrometer.cs b/WasatchNET/ISpectrometer.cs index 1a022da..e297ffc 100644 --- a/WasatchNET/ISpectrometer.cs +++ b/WasatchNET/ISpectrometer.cs @@ -1,6 +1,7 @@ using System; using System.Runtime.InteropServices; using System.Threading.Tasks; +using static WasatchNET.Spectrometer; namespace WasatchNET { @@ -313,6 +314,7 @@ public interface ISpectrometer UInt16 laserWatchdogSec { get; set; } bool laserTECEnabled { get; set; } ushort laserTECMode { get; set; } + IMAGE_SENSOR_STATUS imageSensorStatus { get; } uint lineLength { get; } diff --git a/WasatchNET/MockEEPROM.cs b/WasatchNET/MockEEPROM.cs index 24872bb..a75a302 100644 --- a/WasatchNET/MockEEPROM.cs +++ b/WasatchNET/MockEEPROM.cs @@ -23,6 +23,7 @@ internal MockEEPROM(MockSpectrometer spec) : base(spec) linearityCoeffs = new float[5]; laserPowerCoeffs = new float[4]; intensityCorrectionCoeffs = new float[12]; + assemblyRevision = new byte[6]; badPixelList = new List(); badPixelSet = new SortedSet(); diff --git a/WasatchNET/MockSpectrometer.cs b/WasatchNET/MockSpectrometer.cs index 84a008f..9578b4c 100644 --- a/WasatchNET/MockSpectrometer.cs +++ b/WasatchNET/MockSpectrometer.cs @@ -178,6 +178,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort detectorTECSetpointRaw { get diff --git a/WasatchNET/ParseData.cs b/WasatchNET/ParseData.cs index c0d160c..92e1a60 100644 --- a/WasatchNET/ParseData.cs +++ b/WasatchNET/ParseData.cs @@ -34,6 +34,7 @@ public static String toString(byte[] buf, int index = 0, int len = 0) } // don't add a lot of value, do they? + public static sbyte toInt8 (byte[] buf, int index) { return unchecked((sbyte)buf[index]); } public static byte toUInt8 (byte[] buf, int index) { return buf[index]; } public static bool toBool (byte[] buf, int index) { return buf[index] != 0; } public static float toFloat (byte[] buf, int index) { return BitConverter.ToSingle(buf, index); } @@ -171,6 +172,17 @@ public static bool writeByte(byte value, byte[] buf, int index) return true; } + public static bool writeInt8(sbyte value, byte[] buf, int index) + { + buf[index] = (byte)value; + + Logger logger = Logger.getInstance(); + logger.debug("writeByte: wrote {0} as 0x{1:x2} to index {2} of {3}-byte buf", + value, buf[index], index, buf.Length); + + return true; + } + /// /// Return the UInt16 with the same internal bit-structure as a given Int16. /// diff --git a/WasatchNET/Properties/AssemblyInfo.cs b/WasatchNET/Properties/AssemblyInfo.cs index f0bb8de..8788eac 100644 --- a/WasatchNET/Properties/AssemblyInfo.cs +++ b/WasatchNET/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.5.23.0")] -[assembly: AssemblyFileVersion("2.5.23.0")] +[assembly: AssemblyVersion("2.5.25.0")] +[assembly: AssemblyFileVersion("2.5.25.0")] diff --git a/WasatchNET/SPIEEPROM.cs b/WasatchNET/SPIEEPROM.cs index a0bd377..2fc0e6e 100644 --- a/WasatchNET/SPIEEPROM.cs +++ b/WasatchNET/SPIEEPROM.cs @@ -24,6 +24,7 @@ internal SPIEEPROM(SPISpectrometer spec) : base(spec) linearityCoeffs = new float[5]; laserPowerCoeffs = new float[4]; intensityCorrectionCoeffs = new float[12]; + assemblyRevision = new byte[6]; badPixelList = new List(); badPixelSet = new SortedSet(); diff --git a/WasatchNET/SPISpectrometer.cs b/WasatchNET/SPISpectrometer.cs index e0ef92e..e0da292 100644 --- a/WasatchNET/SPISpectrometer.cs +++ b/WasatchNET/SPISpectrometer.cs @@ -833,6 +833,18 @@ protected override async Task getSpectrumRawAsync(bool skipTrigger=fal public override bool resetFPGA() => true; + public override bool areaScanEnabled + { + get + { + return areaScanEnabled_; + } + set + { + + } + } + public override bool highGainModeEnabled { get { return false; } @@ -1073,6 +1085,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort laserTemperatureSetpointRaw { get => 0; } public override UInt16 laserWatchdogSec diff --git a/WasatchNET/Spectrometer.cs b/WasatchNET/Spectrometer.cs index cee8189..b1b20d8 100644 --- a/WasatchNET/Spectrometer.cs +++ b/WasatchNET/Spectrometer.cs @@ -77,7 +77,8 @@ public enum IMAGE_SENSOR_STATUS IMG_SNSR_STATE_REG_HOLD = 3, IMG_SNSR_STATE_ACTIVE = 4, IMG_SNSR_STATE_ERROR = 5, - IMG_SNSR_STATE_READ_FAIL = 6 + IMG_SNSR_STATE_READ_FAIL = 6, + IMG_SNSR_STATE_NO_RESPONSE = 255 } //////////////////////////////////////////////////////////////////////// @@ -106,7 +107,7 @@ public enum IMAGE_SENSOR_STATUS protected object adcLock = new object(); protected object acquisitionLock = new object(); //!< synchronizes getSpectrum, integrationTimeMS, scanAveraging, dark and boxcarHalfWidth - object commsLock = new object(); //!< synchronizes getCmd, getCmd2, sendCmd + protected object commsLock = new object(); //!< synchronizes getCmd, getCmd2, sendCmd DateTime lastUsbTimestamp = DateTime.Now; internal bool shuttingDown = false; @@ -1787,7 +1788,7 @@ public virtual IMAGE_SENSOR_STATUS imageSensorStatus if (pack != null && pack.Length > 0) return (IMAGE_SENSOR_STATUS)pack[0]; - return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_READ_FAIL; + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; } } diff --git a/WasatchNET/TCPEEPROM.cs b/WasatchNET/TCPEEPROM.cs index 9b28910..e1c3d5d 100644 --- a/WasatchNET/TCPEEPROM.cs +++ b/WasatchNET/TCPEEPROM.cs @@ -23,6 +23,7 @@ internal TCPEEPROM(TCPSpectrometer spec) : base(spec) linearityCoeffs = new float[5]; laserPowerCoeffs = new float[4]; intensityCorrectionCoeffs = new float[12]; + assemblyRevision = new byte[6]; badPixelList = new List(); badPixelSet = new SortedSet(); diff --git a/WasatchNET/TCPSpectrometer.cs b/WasatchNET/TCPSpectrometer.cs index cf22987..27d4edd 100644 --- a/WasatchNET/TCPSpectrometer.cs +++ b/WasatchNET/TCPSpectrometer.cs @@ -67,6 +67,8 @@ override internal async Task openAsync() logger.debug("TCPSpec: client connected, getting stream"); stream = client.GetStream(); + stream.ReadTimeout = 20000; + stream.WriteTimeout = 20000; logger.debug("TCPSpec: stream acquired"); } catch (Exception ex) @@ -118,13 +120,29 @@ bool checkSocket() bool setBinaryMode() { - byte[] data = readData(3); - if (data == null || (char)data[0] != 'O' || (char)data[1] != 'K' || (char)data[2] != '\n') + byte[] result = null; + logger.debug("TCPSpec::setBinaryMode: grabbing lock"); + lock (commsLock) { - return false; + logger.debug("TCPSpec::setBinaryMode: grabbed lock"); + try + { + //Thread.Sleep(50); + byte[] data = readData(3); + if (data == null || (char)data[0] != 'O' || (char)data[1] != 'K' || (char)data[2] != '\n') + { + return false; + } + sendString("BIN\n"); + //Thread.Sleep(50); + result = readData(1); + } + catch (Exception ex) + { + logger.error("TCP spec operation failed with exception: {0}", ex.Message); + } } - sendString("BIN\n"); - byte[] result = readData(1); + logger.debug("TCPSpec::setBinaryMode: released lock"); if (result != null && result[0] == 0) return true; @@ -140,8 +158,24 @@ byte[] getCommand(byte bRequest, int len, int wValue = 0, int wIndex = 0, int fu byte[] serialized = packet.serialize(); logger.hexdump(serialized, "sending getCommand packet: "); - stream.Write(serialized, 0, serialized.Length); - byte[] data = readData(bytesToRead); + byte[] data = null; + + logger.debug("TCPSpec::getCommand: grabbing lock"); + lock (commsLock) + { + logger.debug("TCPSpec::getCommand: grabbed lock"); + try + { + stream.Write(serialized, 0, serialized.Length); + //Thread.Sleep(50); + data = readData(bytesToRead); + } + catch (Exception ex) + { + logger.error("TCP spec operation failed with exception: {0}", ex.Message); + } + } + logger.debug("TCPSpec::getCommand: released lock"); logger.hexdump(data, "getCommand reposonse: "); return data; } @@ -151,20 +185,37 @@ byte[] sendCommand(byte bRequest, int wValue = 0, int wIndex = 0, byte[] payload TCPMessagePacket packet = new TCPMessagePacket(bRequest, (ushort)wValue, (ushort)wIndex, payload); byte[] serialized = packet.serialize(); logger.hexdump(serialized, "sendCommand packet: "); + byte[] data = null; - stream.Write(serialized, 0, serialized.Length); - - if (readBack != null) - { - byte[] data = readData(readBack.Value); - logger.hexdump(data, "sendCommand reposonse: "); - return data; - } - else + logger.debug("TCPSpec::sendCommand: grabbing lock"); + lock (commsLock) { - byte[] data = readData(1); - return data; + logger.debug("TCPSpec::sendCommand: grabbed lock"); + try + { + stream.Write(serialized, 0, serialized.Length); + //Thread.Sleep(50); + + if (readBack != null) + { + data = readData(readBack.Value); + logger.hexdump(data, "sendCommand reposonse: "); + } + else + { + data = readData(1); + logger.hexdump(data, "sendCommand reposonse: "); + } + } + + catch (Exception ex) + { + logger.error("TCP spec operation failed with exception: {0}", ex.Message); + data = null; + } } + logger.debug("TCPSpec::sendCommand: released lock"); + return data; } byte[] readData(int length) @@ -184,7 +235,7 @@ byte[] readData(int length) else { logger.debug("ERROR: read {0} bytes from socket ({1} expected)", read, length); - return null; + return response; } } @@ -201,9 +252,29 @@ void sendString(string message) stream.Write(data.ToArray(), 0, data.Count); } + const int REF_PIXEL_1 = 3; + const int REF_PIXEL_2 = 585; + public override double[] getSpectrum(bool forceNew = false) { double[] sum = getSpectrumRaw(); + if (forceNew && sum != null) + { + Thread.Sleep((int)integrationTimeMS + initialSpecDelayMS); + + double max = sum.Max(); + double ref1 = sum[REF_PIXEL_1]; + double ref2 = sum[REF_PIXEL_2]; + + while (max == sum.Max() && ref1 == sum[REF_PIXEL_1] && ref2 == sum[REF_PIXEL_2]) + { + Thread.Sleep(pollDelayMS); + sum = getSpectrumRaw(); + if (sum == null) + break; + } + } + if (sum == null) { logger.error("getSpectrum: getSpectrumRaw returned null"); @@ -213,13 +284,32 @@ public override double[] getSpectrum(bool forceNew = false) if (scanAveraging_ > 1) { - // logger.debug("getSpectrum: getting additional spectra for averaging"); + logger.debug("getSpectrum: getting additional spectra for averaging"); for (uint i = 1; i < scanAveraging_; i++) { + logger.debug("getSpectrum: getting additional spectrum {0}", i); double[] tmp = getSpectrumRaw(); + if (forceNew && tmp != null) + { + Thread.Sleep((int)integrationTimeMS + 50); + + double max = tmp.Max(); + double ref1 = tmp[REF_PIXEL_1]; + double ref2 = tmp[REF_PIXEL_2]; + + while (max == tmp.Max() && ref1 == tmp[REF_PIXEL_1] && ref2 == tmp[REF_PIXEL_2]) + { + Thread.Sleep(pollDelayMS); + tmp = getSpectrumRaw(); + if (tmp == null) + break; + } + } if (tmp == null) + { + logger.error("getSpectrum: getSpectrumRaw returned null"); return null; - + } for (int px = 0; px < pixels; px++) sum[px] += tmp[px]; } @@ -232,6 +322,8 @@ public override double[] getSpectrum(bool forceNew = false) for (int px = 0; px < pixels; px++) sum[px] -= dark_[px]; + logger.debug("getSpectrum: all spectra collected, returning"); + if (boxcarHalfWidth > 0) { // logger.debug("getSpectrum: returning boxcar"); @@ -290,28 +382,113 @@ protected override double[] getSpectrumRaw(bool skipTrigger = false) { double[] spec = new double[pixels]; - sendCommand(0xad); + try + { + sendCommand(0xad); - byte[] data = readData((int)pixels * 2); - for (int px = 0; px < pixels; px++) + logger.debug("TCPSpec::getSpectrumRaw: grabbing lock"); + lock (commsLock) + { + logger.debug("TCPSpec::getSpectrumRaw: grabbed lock"); + byte[] data = readData((int)pixels * 2); + for (int px = 0; px < pixels; px++) + { + int intensity = data[px * 2] | data[px * 2 + 1] << 8; + spec[px] = intensity; + } + + if (eeprom.featureMask.invertXAxis) + Array.Reverse(spec); + } + logger.debug("TCPSpec::getSpectrumRaw: released lock"); + } + catch (Exception ex) { - int intensity = data[px * 2] | data[px * 2 + 1] << 8; - spec[px] = intensity; + logger.error("TCP spec operation failed with exception: {0}", ex.Message); + return null; } - - if (eeprom.featureMask.invertXAxis) - Array.Reverse(spec); + return spec; + } + + public int readTimeoutMS + { + get => _readTimeoutMS; + set + { + if (_readTimeoutMS != value) + { + _readTimeoutMS = value; + if (stream != null) + { + stream.ReadTimeout = value; + } + } + } + } + int _readTimeoutMS = 20000; + + public int writeTimeoutMS + { + get => _writeTimeoutMS; + set + { + if (_writeTimeoutMS != value) + { + _writeTimeoutMS = value; + if (stream != null) + { + stream.WriteTimeout = value; + } + } + } + } + int _writeTimeoutMS = 20000; + public int initialSpecDelayMS + { + get => _initialSpecDelayMS; + set + { + if (_initialSpecDelayMS != value) + { + _initialSpecDelayMS = value; + if (stream != null) + { + stream.WriteTimeout = value; + } + } + } } + int _initialSpecDelayMS = 300; + + public int pollDelayMS + { + get => _pollDelayMS; + set + { + if (_pollDelayMS != value) + { + _pollDelayMS = value; + if (stream != null) + { + stream.WriteTimeout = value; + } + } + } + } + int _pollDelayMS = 50; + + + protected override async Task getSpectrumRawAsync(bool skipTrigger = false) { logger.debug("requesting spectrum"); double[] spec = new double[pixels]; sendCommand(0xad); - + //Thread.Sleep(50); byte[] data = readData((int)pixels * 2); for (int px = 0; px < pixels; px++) { @@ -484,6 +661,18 @@ public void setExcitation(float value) byte[] ok = sendCommand(0xff, 0xaa11, 0, pay2); } + public override bool areaScanEnabled + { + get + { + return areaScanEnabled_; + } + set + { + + } + } + public override bool highGainModeEnabled { get { return false; } @@ -504,7 +693,10 @@ public override string serialNumber public override uint boxcarHalfWidth { get { return boxcarHalfWidth_; } - set { lock (acquisitionLock) boxcarHalfWidth_ = value; } + set + { + boxcarHalfWidth_ = value; + } } public override uint integrationTimeMS @@ -723,6 +915,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort laserTemperatureSetpointRaw { get => 0; } public override UInt16 laserWatchdogSec diff --git a/WasatchNET/WPOCTSpectrometer.cs b/WasatchNET/WPOCTSpectrometer.cs index 2149dd7..8345964 100644 --- a/WasatchNET/WPOCTSpectrometer.cs +++ b/WasatchNET/WPOCTSpectrometer.cs @@ -467,6 +467,15 @@ public override ushort laserTECMode } } + public override IMAGE_SENSOR_STATUS imageSensorStatus + { + //we do NOT want to cache this one + get + { + return IMAGE_SENSOR_STATUS.IMG_SNSR_STATE_NO_RESPONSE; + } + } + public override ushort detectorTECSetpointRaw { get diff --git a/WinFormDemo/Properties/AssemblyInfo.cs b/WinFormDemo/Properties/AssemblyInfo.cs index c8b0b03..c7acaa1 100644 --- a/WinFormDemo/Properties/AssemblyInfo.cs +++ b/WinFormDemo/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.5.23.0")] -[assembly: AssemblyFileVersion("2.5.23.0")] +[assembly: AssemblyVersion("2.5.25.0")] +[assembly: AssemblyFileVersion("2.5.25.0")] diff --git a/lib/AnyCPU/WasatchNET.dll b/lib/AnyCPU/WasatchNET.dll index 209925b..76537f2 100644 Binary files a/lib/AnyCPU/WasatchNET.dll and b/lib/AnyCPU/WasatchNET.dll differ diff --git a/lib/x64/WasatchNET.dll b/lib/x64/WasatchNET.dll index 0af2004..1c0e511 100644 Binary files a/lib/x64/WasatchNET.dll and b/lib/x64/WasatchNET.dll differ diff --git a/lib/x86/WasatchNET.dll b/lib/x86/WasatchNET.dll index 9f0bd97..38f4f26 100644 Binary files a/lib/x86/WasatchNET.dll and b/lib/x86/WasatchNET.dll differ