diff --git a/Halovision/Dependencies/lucidcode.LucidScribe.Interface.Illuminated.dll b/Halovision/Dependencies/lucidcode.LucidScribe.Interface.Illuminated.dll
new file mode 100644
index 0000000..a813739
Binary files /dev/null and b/Halovision/Dependencies/lucidcode.LucidScribe.Interface.Illuminated.dll differ
diff --git a/Halovision/Halovision.csproj b/Halovision/Halovision.csproj
index a173c57..3d444ab 100644
--- a/Halovision/Halovision.csproj
+++ b/Halovision/Halovision.csproj
@@ -121,6 +121,9 @@
Dependencies\lucidcode.LucidScribe.Interface.dll
False
+
+ Dependencies\lucidcode.LucidScribe.Interface.Illuminated.dll
+
Dependencies\lucidcode.LucidScribe.TCMP.dll
diff --git a/Halovision/PluginHandler.cs b/Halovision/PluginHandler.cs
index 7027572..521f980 100644
--- a/Halovision/PluginHandler.cs
+++ b/Halovision/PluginHandler.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Drawing;
using System.IO;
using System.Media;
using System.Threading;
@@ -12,6 +13,11 @@ public static class Device
static bool Initialized;
static bool InitError;
static int Value = 0;
+ static int Readings = 0;
+
+ private static bool clearValue;
+
+ public static EventHandler VisionChanged;
static VisionForm visionForm;
public static bool Initialize()
@@ -38,7 +44,20 @@ public static bool Initialize()
private static void VisionForm_ValueChanged(int value)
{
- Value = value;
+ Value = Value + value;
+ Readings = Readings + 1;
+
+ if (clearValue)
+ {
+ clearValue = false;
+ Readings = 0;
+ Value = 0;
+ }
+
+ if (VisionChanged != null)
+ {
+ VisionChanged((object)value, null);
+ }
}
static void loadVisionForm()
@@ -73,7 +92,13 @@ public static void Dispose()
public static int GetVision()
{
- return Value;
+ //if (Readings == 0) return 0;
+
+ int value = Value; //
+ // Readings;
+ //if (Readings > 0) value = value / Readings;
+ clearValue = true;
+ return value;
}
public static int GetTossThreshold()
@@ -261,8 +286,6 @@ namespace Vision
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
- SoundPlayer sound = new SoundPlayer();
-
public override string Name
{
get
@@ -273,6 +296,10 @@ public override string Name
public override bool Initialize()
{
+
+ if (Device.Auralize) {
+ System.Media.SystemSounds.Asterisk.Play();
+ }
return Device.Initialize();
}
@@ -307,6 +334,7 @@ private void Auralize(double frequency)
soundBytes.AddRange(format.GetBytes());
soundBytes.AddRange(austioChunk.GetBytes());
+ var sound = new SoundPlayer();
sound.Stream = new MemoryStream(soundBytes.ToArray());
sound.Play();
}
@@ -318,6 +346,128 @@ public override void Dispose()
}
}
+ namespace RAW
+ {
+ public class PluginHandler : lucidcode.LucidScribe.Interface.ILluminatedPlugin
+ {
+
+ public string Name
+ {
+ get
+ {
+ return "Halovision RAW";
+ }
+ }
+
+ public bool Initialize()
+ {
+ try
+ {
+ bool initialized = Device.Initialize();
+ Device.VisionChanged += VisionChanged;
+ return initialized;
+ }
+ catch (Exception ex)
+ {
+ throw (new Exception("The '" + Name + "' plugin failed to initialize: " + ex.Message));
+ }
+ }
+
+ public event Interface.SenseHandler Sensed;
+ public void VisionChanged(object sender, EventArgs e)
+ {
+ if (ClearTicks)
+ {
+ ClearTicks = false;
+ TickCount = "";
+ }
+ TickCount += sender + ",";
+
+ if (ClearBuffer)
+ {
+ ClearBuffer = false;
+ BufferData = "";
+ }
+ BufferData += sender + ",";
+ }
+
+ public void Dispose()
+ {
+ Device.VisionChanged -= VisionChanged;
+ Device.Dispose();
+ }
+
+ public Boolean isEnabled = false;
+ public Boolean Enabled
+ {
+ get
+ {
+ return isEnabled;
+ }
+ set
+ {
+ isEnabled = value;
+ }
+ }
+
+ public Color PluginColor = Color.White;
+ public Color Color
+ {
+ get
+ {
+ return Color;
+ }
+ set
+ {
+ Color = value;
+ }
+ }
+
+ private Boolean ClearTicks = false;
+ public String TickCount = "";
+ public String Ticks
+ {
+ get
+ {
+ ClearTicks = true;
+ return TickCount;
+ }
+ set
+ {
+ TickCount = value;
+ }
+ }
+
+ private Boolean ClearBuffer = false;
+ public String BufferData = "";
+ public String Buffer
+ {
+ get
+ {
+ ClearBuffer = true;
+ return BufferData;
+ }
+ set
+ {
+ BufferData = value;
+ }
+ }
+
+ int lastHour;
+ public int LastHour
+ {
+ get
+ {
+ return lastHour;
+ }
+ set
+ {
+ lastHour = value;
+ }
+ }
+ }
+ }
+
namespace REM
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
diff --git a/Halovision/VisionForm.designer.cs b/Halovision/VisionForm.designer.cs
index c6585db..982e1dc 100644
--- a/Halovision/VisionForm.designer.cs
+++ b/Halovision/VisionForm.designer.cs
@@ -190,6 +190,7 @@ private void InitializeComponent()
// tmrDiff
//
this.tmrDiff.Enabled = true;
+ this.tmrDiff.Interval = 20;
this.tmrDiff.Tick += new System.EventHandler(this.tmrDiff_Tick);
//
// pbDifference
diff --git a/Installer/Lucid Scribe Halovision.vdproj b/Installer/Lucid Scribe Halovision.vdproj
index 0b47e19..de3998d 100644
--- a/Installer/Lucid Scribe Halovision.vdproj
+++ b/Installer/Lucid Scribe Halovision.vdproj
@@ -633,6 +633,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_5294BB40EE33B2C3602EF328FF25AADE"
+ "OwnerKey" = "8:_395AC690E5F04358B866710FD743FFE4"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_53FD229DEDBBC6B6C38C5D53D2512E09"
"OwnerKey" = "8:_395AC690E5F04358B866710FD743FFE4"
"MsmSig" = "8:_UNDEFINED"
@@ -2002,6 +2008,12 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
+ "OwnerKey" = "8:_5294BB40EE33B2C3602EF328FF25AADE"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_9768C46742605F22AB604239F03E17DD"
"MsmSig" = "8:_UNDEFINED"
}
@@ -5273,6 +5285,37 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
+ "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_5294BB40EE33B2C3602EF328FF25AADE"
+ {
+ "AssemblyRegister" = "3:1"
+ "AssemblyIsInGAC" = "11:FALSE"
+ "AssemblyAsmDisplayName" = "8:lucidcode.LucidScribe.Interface.Illuminated, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL"
+ "ScatterAssemblies"
+ {
+ "_5294BB40EE33B2C3602EF328FF25AADE"
+ {
+ "Name" = "8:lucidcode.LucidScribe.Interface.Illuminated.dll"
+ "Attributes" = "3:512"
+ }
+ }
+ "SourcePath" = "8:lucidcode.LucidScribe.Interface.Illuminated.dll"
+ "TargetName" = "8:"
+ "Tag" = "8:"
+ "Folder" = "8:_491A001224CF4D699EA475B2FB5F2890"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:TRUE"
+ "IsDependency" = "11:TRUE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_53FD229DEDBBC6B6C38C5D53D2512E09"
{
"AssemblyRegister" = "3:1"
@@ -10814,7 +10857,7 @@
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe Halovision"
"ProductCode" = "8:{411774F8-3E0E-4CF2-9192-C614B596B336}"
- "PackageCode" = "8:{29D970C5-AC16-4945-8EE1-803FDC2C989D}"
+ "PackageCode" = "8:{1BBABB08-9954-4183-AD1A-8EFC431B9F5F}"
"UpgradeCode" = "8:{CAAB2187-AD23-435C-A3DB-568744247625}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"