diff --git a/Halovision/Halovision.csproj b/Halovision/Halovision.csproj index e14da7c..9fe352e 100644 --- a/Halovision/Halovision.csproj +++ b/Halovision/Halovision.csproj @@ -294,6 +294,18 @@ + + + + + + + + + + + + Always diff --git a/Halovision/Properties/AssemblyInfo.cs b/Halovision/Properties/AssemblyInfo.cs index 69658d2..642f17f 100644 --- a/Halovision/Properties/AssemblyInfo.cs +++ b/Halovision/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("1.1.9.0")] -[assembly: AssemblyFileVersion("1.1.9.0")] +[assembly: AssemblyVersion("1.2.2.0")] +[assembly: AssemblyFileVersion("1.2.2.0")] diff --git a/Halovision/Properties/Resources.Designer.cs b/Halovision/Properties/Resources.Designer.cs index 81ff7f4..5f8e592 100644 --- a/Halovision/Properties/Resources.Designer.cs +++ b/Halovision/Properties/Resources.Designer.cs @@ -60,6 +60,96 @@ internal Resources() { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _1 { + get { + object obj = ResourceManager.GetObject("_1", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _2 { + get { + object obj = ResourceManager.GetObject("_2", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _3 { + get { + object obj = ResourceManager.GetObject("_3", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _4 { + get { + object obj = ResourceManager.GetObject("_4", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _5 { + get { + object obj = ResourceManager.GetObject("_5", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _6 { + get { + object obj = ResourceManager.GetObject("_6", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _7 { + get { + object obj = ResourceManager.GetObject("_7", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _8 { + get { + object obj = ResourceManager.GetObject("_8", resourceCulture); + return ((byte[])(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] _9 { + get { + object obj = ResourceManager.GetObject("_9", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// @@ -128,6 +218,16 @@ internal static byte[] e { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] enter { + get { + object obj = ResourceManager.GetObject("enter", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// @@ -258,6 +358,16 @@ internal static byte[] r { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + internal static byte[] rewind { + get { + object obj = ResourceManager.GetObject("rewind", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized resource of type System.Byte[]. /// diff --git a/Halovision/Properties/Resources.resx b/Halovision/Properties/Resources.resx index 7179d70..9e93f29 100644 --- a/Halovision/Properties/Resources.resx +++ b/Halovision/Properties/Resources.resx @@ -139,6 +139,9 @@ ..\Resources\e.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\enter.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\Resources\f.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -178,6 +181,9 @@ ..\Resources\r.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\rewind.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\Resources\s.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -202,4 +208,31 @@ ..\Resources\z.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\1.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\2.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\3.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\4.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\5.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\6.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\7.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\8.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\9.mp3;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Halovision/Resources/1.mp3 b/Halovision/Resources/1.mp3 new file mode 100644 index 0000000..35165f4 Binary files /dev/null and b/Halovision/Resources/1.mp3 differ diff --git a/Halovision/Resources/2.mp3 b/Halovision/Resources/2.mp3 new file mode 100644 index 0000000..4f6cdd5 Binary files /dev/null and b/Halovision/Resources/2.mp3 differ diff --git a/Halovision/Resources/3.mp3 b/Halovision/Resources/3.mp3 new file mode 100644 index 0000000..76c63ef Binary files /dev/null and b/Halovision/Resources/3.mp3 differ diff --git a/Halovision/Resources/4.mp3 b/Halovision/Resources/4.mp3 new file mode 100644 index 0000000..27bd001 Binary files /dev/null and b/Halovision/Resources/4.mp3 differ diff --git a/Halovision/Resources/5.mp3 b/Halovision/Resources/5.mp3 new file mode 100644 index 0000000..9f938c3 Binary files /dev/null and b/Halovision/Resources/5.mp3 differ diff --git a/Halovision/Resources/6.mp3 b/Halovision/Resources/6.mp3 new file mode 100644 index 0000000..2de482b Binary files /dev/null and b/Halovision/Resources/6.mp3 differ diff --git a/Halovision/Resources/7.mp3 b/Halovision/Resources/7.mp3 new file mode 100644 index 0000000..3c59a83 Binary files /dev/null and b/Halovision/Resources/7.mp3 differ diff --git a/Halovision/Resources/8.mp3 b/Halovision/Resources/8.mp3 new file mode 100644 index 0000000..eb4af77 Binary files /dev/null and b/Halovision/Resources/8.mp3 differ diff --git a/Halovision/Resources/9.mp3 b/Halovision/Resources/9.mp3 new file mode 100644 index 0000000..7d1f99d Binary files /dev/null and b/Halovision/Resources/9.mp3 differ diff --git a/Halovision/Resources/enter.mp3 b/Halovision/Resources/enter.mp3 new file mode 100644 index 0000000..8a7c9a8 Binary files /dev/null and b/Halovision/Resources/enter.mp3 differ diff --git a/Halovision/Resources/return.mp3 b/Halovision/Resources/return.mp3 new file mode 100644 index 0000000..8a7c9a8 Binary files /dev/null and b/Halovision/Resources/return.mp3 differ diff --git a/Halovision/Resources/rewind.mp3 b/Halovision/Resources/rewind.mp3 new file mode 100644 index 0000000..5fdc4db Binary files /dev/null and b/Halovision/Resources/rewind.mp3 differ diff --git a/Halovision/TCMP.cs b/Halovision/TCMP.cs index a0db354..a7be204 100644 --- a/Halovision/TCMP.cs +++ b/Halovision/TCMP.cs @@ -71,6 +71,8 @@ public override bool Initialize() {'7' , "--..."}, {'8' , "---.."}, {'9' , "----."}, + {'⌫' , "----"}, + {'⏎' , ".-.-"}, }; List history = new List(); @@ -84,162 +86,184 @@ public override double Value { get { - if (!Device.TCMP) { return 0; } - - int visionValue = Device.GetVision(); - if (visionValue > 999) { visionValue = 999; } - if (visionValue < 0) { visionValue = 0; } - - if (!Started) + try { - // Ignore any spike during startup - PreliminaryTicks++; - if (PreliminaryTicks > 10) - { - Started = true; - } - - return 0; - } - - int signalLength = 0; - int dotHeight = Device.GetDotThreshold(); - int dashHeight = Device.GetDashThreshold(); + if (!Device.TCMP) { return 0; } - String signal = ""; + int visionValue = Device.GetVision(); + if (visionValue > 999) { visionValue = 999; } + if (visionValue < 0) { visionValue = 0; } - soundHistory.Add(visionValue); - if (soundHistory.Count > 6) - { - int peakValue = 0; - - for (int i = 0; i < soundHistory.Count; i++) + if (!Started) { - if (soundHistory[i] > peakValue) + // Ignore any spike during startup + PreliminaryTicks++; + if (PreliminaryTicks > 10) { - peakValue = soundHistory[i]; + Started = true; } + + return 0; } - if (soundHistory[soundHistory.Count - 1] < dotHeight / 4 && soundHistory[soundHistory.Count - 2] < dotHeight / 4) + int signalLength = 0; + int dotHeight = Device.GetDotThreshold(); + int dashHeight = Device.GetDashThreshold(); + + String signal = ""; + + soundHistory.Add(visionValue); + if (soundHistory.Count > 6) { - if (peakValue >= dashHeight) + int peakValue = 0; + + for (int i = 0; i < soundHistory.Count; i++) { - dashSoundPlayer.Play(); - soundHistory.Clear(); + if (soundHistory[i] > peakValue) + { + peakValue = soundHistory[i]; + } } - else if (peakValue >= dotHeight) + + if (soundHistory[soundHistory.Count - 1] < dotHeight / 4 && soundHistory[soundHistory.Count - 2] < dotHeight / 4) { - dotSoundPlayer.Play(); - soundHistory.Clear(); + if (peakValue >= dashHeight) + { + dashSoundPlayer.Play(); + soundHistory.Clear(); + } + else if (peakValue >= dotHeight) + { + dotSoundPlayer.Play(); + soundHistory.Clear(); + } } } - } - if ((visionValue >= dotHeight) || history.Count > 0) - { - history.Add(visionValue); - } + if ((visionValue >= dotHeight) || history.Count > 0) + { + history.Add(visionValue); + } - if (!SpaceSent & history.Count == 0) - { - TicksSinceSpace++; - if (TicksSinceSpace > 34) + if (!SpaceSent & history.Count == 0) { - // Send the space key - Morse = " "; - SendKeys.Send(" "); - SpaceSent = true; - TicksSinceSpace = 0; - history.Clear(); + TicksSinceSpace++; + if (TicksSinceSpace > 34) + { + // Send the space key + Morse = " "; + SendKeys.Send(" "); + SpaceSent = true; + TicksSinceSpace = 0; + history.Clear(); + } } - } - if (history.Count > 34) - { - int nextOffset = 0; - do + if (history.Count > 42) { - int peakValue = 0; - for (int i = nextOffset; i < history.Count; i++) + int nextOffset = 0; + do { - for (int x = i; x < history.Count; x++) + int peakValue = 0; + for (int i = nextOffset; i < history.Count; i++) { - if (history[x] > peakValue) + for (int x = i; x < history.Count; x++) { - peakValue = history[x]; + if (history[x] > peakValue) + { + peakValue = history[x]; + } + + if (history[x] < dotHeight / 4 && history[x - 1] < dotHeight / 4) + { + nextOffset = x + 1; + break; + } + + if (x == history.Count - 1) + { + nextOffset = -1; + } } - if (history[x] < dotHeight / 4 && history[x - 1] < dotHeight / 4) + if (peakValue >= dashHeight) { - nextOffset = x + 1; + signal += "-"; + signalLength++; + break; + } + else if (peakValue >= dotHeight) + { + signal += "."; + signalLength++; break; } - if (x == history.Count - 1) + if (i >= history.Count - 1) { nextOffset = -1; } - } - if (peakValue >= dashHeight) - { - signal += "-"; - signalLength++; - break; } - else if (peakValue >= dotHeight) + + if (nextOffset < 0 | nextOffset == history.Count) { - signal += "."; - signalLength++; break; } - if (i >= history.Count - 1) - { - nextOffset = -1; - } + } while (true); - } + history.RemoveAt(0); - if (nextOffset < 0 | nextOffset == history.Count) + // Check if the signal is morse + try { - break; - } - - } while (true); + // Make sure that we have a signal + if (signal != "") + { + var myValue = Code.First(x => x.Value == signal); + Morse = myValue.Key.ToString(); + var letter = myValue.Key.ToString(); - history.RemoveAt(0); + if (letter == "⌫") + { + SendKeys.Send("{BKSP}"); + } + else if (letter == "⏎") + { + SendKeys.Send("{ENTER}"); + } + else + { + SendKeys.Send(letter); + } - // Check if the signal is morse - try - { - // Make sure that we have a signal - if (signal != "") - { - var myValue = Code.First(x => x.Value == signal); - Morse = myValue.Key.ToString(); - var letter = myValue.Key.ToString(); - SendKeys.Send(letter); - signal = ""; - history.Clear(); - SpaceSent = false; - TicksSinceSpace = 0; + signal = ""; + history.Clear(); + SpaceSent = false; + TicksSinceSpace = 0; - if (Device.Auralize) - { - SpeakLetter(letter); + if (Device.Auralize) + { + SpeakLetter(letter); + } } } + catch (Exception ex) + { + String err = ex.Message; + } } - catch (Exception ex) - { - String err = ex.Message; - } - } - if (history.Count > 0) - { return 820; } + if (history.Count > 0) + { return 820; } + + } + catch (Exception ex) + { + history = new List(); + soundHistory = new List(); + } return 0; } @@ -291,6 +315,18 @@ private MemoryStream GetResourceStream(String letter) case "x": return new MemoryStream(Properties.Resources.x); case "y": return new MemoryStream(Properties.Resources.y); case "z": return new MemoryStream(Properties.Resources.z); + case "0": return new MemoryStream(Properties.Resources.o); + case "1": return new MemoryStream(Properties.Resources._1); + case "2": return new MemoryStream(Properties.Resources._2); + case "3": return new MemoryStream(Properties.Resources._3); + case "4": return new MemoryStream(Properties.Resources._4); + case "5": return new MemoryStream(Properties.Resources._5); + case "6": return new MemoryStream(Properties.Resources._6); + case "7": return new MemoryStream(Properties.Resources._7); + case "8": return new MemoryStream(Properties.Resources._8); + case "9": return new MemoryStream(Properties.Resources._9); + case "⌫": return new MemoryStream(Properties.Resources.rewind); + case "⏎": return new MemoryStream(Properties.Resources.enter); default: return new MemoryStream(Properties.Resources.a); } } diff --git a/Installer/Lucid Scribe Halovision.vdproj b/Installer/Lucid Scribe Halovision.vdproj index 09d36bf..223fed6 100644 --- a/Installer/Lucid Scribe Halovision.vdproj +++ b/Installer/Lucid Scribe Halovision.vdproj @@ -2164,49 +2164,43 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_D4D9A343EA19181E29E71FAFA4331A7F" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_476F2A159866458BDE29C4FEDF54200E" + "OwnerKey" = "8:_9768C46742605F22AB604239F03E17DD" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_F6FB468DB78A5D3DEFEE67A8AF431541" + "OwnerKey" = "8:_D4D9A343EA19181E29E71FAFA4331A7F" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_00AD2C6864105DF04AA25B44726000C6" + "OwnerKey" = "8:_476F2A159866458BDE29C4FEDF54200E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_2357E062E20D2135C519BA979BCEF26D" + "OwnerKey" = "8:_CBBBF4A3AED1DCF53F0D5FD2361F0AC0" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_5294BB40EE33B2C3602EF328FF25AADE" + "OwnerKey" = "8:_F6FB468DB78A5D3DEFEE67A8AF431541" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9768C46742605F22AB604239F03E17DD" + "OwnerKey" = "8:_00AD2C6864105DF04AA25B44726000C6" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_CBBBF4A3AED1DCF53F0D5FD2361F0AC0" + "OwnerKey" = "8:_2357E062E20D2135C519BA979BCEF26D" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -2302,6 +2296,12 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_5294BB40EE33B2C3602EF328FF25AADE" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_EB985570A43CB1F054FEBB06500A19A6" "MsmSig" = "8:_UNDEFINED" } @@ -3056,7 +3056,7 @@ { "Name" = "8:.NET Framework" "Message" = "8:[VSDNETMSG]" - "FrameworkVersion" = "8:3.5.30729 " + "FrameworkVersion" = "8:3.5.30729 " "AllowLaterVersions" = "11:FALSE" "InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=76617" } @@ -11352,15 +11352,15 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Lucid Scribe Halovision" - "ProductCode" = "8:{C8C5CCA0-7210-48C0-B8C8-B339B7632404}" - "PackageCode" = "8:{2A394A9A-198E-45B0-A407-E092BFCA8F28}" + "ProductCode" = "8:{B7093B1D-97EB-4A9A-9CAC-495C167DF879}" + "PackageCode" = "8:{D7C8450B-59CE-4FF0-BF59-7F606FD98BE9}" "UpgradeCode" = "8:{CAAB2187-AD23-435C-A3DB-568744247625}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:1.1.9" + "ProductVersion" = "8:1.2.2" "Manufacturer" = "8:lucidcode" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"