Permalink
Browse files

Removed the Arduino options as there is now an Arduino plug-out.

  • Loading branch information...
IAmCoder committed Dec 25, 2014
1 parent c3936ad commit 20f882101f1e5512fc49da6de7c6f44b26bb8dc7
@@ -278,7 +278,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"
}
@@ -573,6 +573,11 @@
"AssemblyAsmDisplayName" = "8:lucidcode.LucidScribe.Interface.Illuminated, Version=1.0.4.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_7477139A985373FCCAE741F7BAE81CE6"
{
"Name" = "8:lucidcode.LucidScribe.Interface.Illuminated.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:lucidcode.LucidScribe.Interface.Illuminated.dll"
"TargetName" = "8:"
@@ -599,6 +604,11 @@
"AssemblyAsmDisplayName" = "8:lucidcode.Controls, Version=1.0.0.1, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_74CC5CEA548AAB471EE4049C7020BD21"
{
"Name" = "8:lucidcode.Controls.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:lucidcode.Controls.dll"
"TargetName" = "8:"
@@ -705,6 +715,11 @@
"AssemblyAsmDisplayName" = "8:lucidcode.LucidScribe.Interface, Version=1.0.2.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_A6D309C81FB7C7C8EB6F2A75CDAED83F"
{
"Name" = "8:lucidcode.LucidScribe.Interface.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:lucidcode.LucidScribe.Interface.dll"
"TargetName" = "8:"
@@ -941,15 +956,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe Zeo"
"ProductCode" = "8:{C45C1CFD-5236-459B-9869-BE35D7698FC8}"
"PackageCode" = "8:{6971806C-8C05-4299-AC8C-710A0D0AF999}"
"ProductCode" = "8:{A3893CDD-058E-408A-ACBE-69FFB7F7C5EB}"
"PackageCode" = "8:{1A4A0704-C998-4884-AC00-D0AFDBEF00DC}"
"UpgradeCode" = "8:{7FC45659-EDA9-401F-A2DB-7EE30232BDE8}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.0.1"
"ProductVersion" = "8:1.0.2"
"Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucid-code.com/Support"
BIN +0 Bytes (100%) Lucid Scribe - Zeo.suo
Binary file not shown.
@@ -32,13 +32,7 @@ public static class Device
private static ManualResetEvent exitEvent = new ManualResetEvent(false);

public static String ZeoPort = "";

public static Boolean Arduino = false;
public static String ArduinoPort = "COM1";
public static String ArduinoDelay = "1";
public static String ArduinoOn = "1";
public static String ArduinoOff = "0";
static Thread zeoThread;
private static Thread zeoThread;

public static EventHandler<RawEventArgs> ZeoChanged;

@@ -59,12 +53,6 @@ public static Boolean Initialize()
PortForm formPort = new PortForm();
if (formPort.ShowDialog() == DialogResult.OK)
{
Arduino = formPort.Arduino;
ArduinoPort = formPort.ArduinoPort;
ArduinoDelay = formPort.ArduinoDelay;
ArduinoOn = formPort.ArduinoOn;
ArduinoOff = formPort.ArduinoOff;

ZeoPort = formPort.SelectedPort;

zeoStream = new ZeoStream(exitEvent);
@@ -365,7 +353,6 @@ namespace Stage
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
Thread ArduinoThread;
public override string Name
{
get { return "Stage"; }
@@ -380,43 +367,11 @@ public override double Value
{
double dblValue = Device.GetValueStage();

// Check if we are dreaming
if (dblValue == 200)
{
// Check if we need to send a message to an arduino
if (Device.Arduino)
{
Device.Arduino = false; // Set false so we don't call it again before the thread completes / after the delay
ArduinoThread = new Thread(TriggerArduino);
ArduinoThread.Start();
}
}

if (dblValue > 999) { dblValue = 999; }
if (dblValue < 0) { dblValue = 0; }
return dblValue;
}
}

private void TriggerArduino()
{
SerialPort arduinoPort = new SerialPort();
arduinoPort.PortName = Device.ArduinoPort;
arduinoPort.BaudRate = 9600;
arduinoPort.Open();

arduinoPort.WriteLine(Device.ArduinoOn);

int arduinoDelay = Convert.ToInt32(Device.ArduinoDelay) * 60000;
Thread.Sleep(arduinoDelay);

arduinoPort.WriteLine(Device.ArduinoOff);

arduinoPort.Close();
arduinoPort.Dispose();

Device.Arduino = true;
}
}
}

@@ -622,4 +577,134 @@ public override void Dispose()
}
}
}

namespace Awake
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
public override string Name
{
get { return "Awake"; }
}
public override bool Initialize()
{
return Device.Initialize();
}
public override double Value
{
get
{
if (Device.GetValueStage() == 100)
{
return 700;
}
return 0;
}
}
}
}

namespace REM
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
public override string Name
{
get { return "REM"; }
}
public override bool Initialize()
{
return Device.Initialize();
}
public override double Value
{
get
{
if (Device.GetValueStage() == 200)
{
return 700;
}
return 0;
}
}
}
}

namespace Light
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
public override string Name
{
get { return "Light"; }
}
public override bool Initialize()
{
return Device.Initialize();
}
public override double Value
{
get
{
if (Device.GetValueStage() == 300)
{
return 700;
}
return 0;
}
}
}
}

namespace Deep
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
public override string Name
{
get { return "Deep"; }
}
public override bool Initialize()
{
return Device.Initialize();
}
public override double Value
{
get
{
if (Device.GetValueStage() == 400)
{
return 700;
}
return 0;
}
}
}
}

namespace Sleep
{
public class PluginHandler : lucidcode.LucidScribe.Interface.LucidPluginBase
{
public override string Name
{
get { return "Sleep"; }
}
public override bool Initialize()
{
return Device.Initialize();
}
public override double Value
{
get
{
if (Device.GetValueStage() == 600)
{
return 700;
}
return 0;
}
}
}
}
}
Oops, something went wrong.

0 comments on commit 20f8821

Please sign in to comment.