Permalink
Browse files

Removed options for the USB relay, as it is now in a plug-out.

  • Loading branch information...
IAmCoder committed Sep 25, 2014
1 parent 592891f commit 7e80da5663ea1fe1fd70c24a0e7b6f846f0c5307
@@ -2253,14 +2253,14 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Lucid Scribe ThinkGear EEG"
"ProductCode" = "8:{81FF8CEA-C435-4E98-A696-0AE9ED58EC82}"
"PackageCode" = "8:{ECB01318-14E2-4655-8DA7-A5CF7C75FA32}"
"ProductCode" = "8:{ED977A69-04BD-4554-8C8E-3FEBBDDDEBB9}"
"PackageCode" = "8:{7A8543B0-F7D9-4FC8-BAB4-83B9D4857101}"
"UpgradeCode" = "8:{9B1E2A82-9D73-4675-9717-2311206ABC4E}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.1.3"
"ProductVersion" = "8:1.1.4"
"Manufacturer" = "8:lucidcode"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:http://www.lucidcode.com/Contact"
BIN +0 Bytes (100%) Lucid Scribe - ThinkGear EEG.suo
Binary file not shown.
@@ -47,11 +47,6 @@ public static class Device
public static Boolean TCMP = false;
public static Boolean NZT48 = false;

public static Boolean tACS = false;
public static String Target = "ANY";
public static String StateOn = "A";
public static String StateOff = "A";

public static Boolean Arduino = false;
public static String ArduinoPort = "COM1";
public static String ArduinoDelay = "1";
@@ -84,11 +79,6 @@ public static Boolean Initialize()
TCMP = formPort.TCMP;
NZT48 = formPort.NZT48;

tACS = formPort.tACS;
Target = formPort.Target;
StateOn = formPort.StateOn;
StateOff = formPort.StateOff;

Arduino = formPort.Arduino;
ArduinoPort = formPort.ArduinoPort;
ArduinoDelay = formPort.ArduinoDelay;
@@ -530,49 +520,6 @@ public override double Value

if (boolDreaming)
{
// Check if we need to turn on a tACS device
if (Device.tACS)
{
try
{
YocoWrapper.YRelay relay;
string errorMessage = "";

if (YocoWrapper.YAPI.RegisterHub("usb", ref errorMessage) != YocoWrapper.YAPI.SUCCESS)
{
MessageBox.Show("tACS RegisterHub error: " + errorMessage, "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

if (Device.Target == "ANY")
{
relay = YocoWrapper.YRelay.FirstRelay();
if (relay == null)
{
MessageBox.Show("tACS RegisterHub error: No module connected (check USB cable).", "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else relay = YocoWrapper.YRelay.FindRelay(Device.Target + ".relay1");

if (relay.isOnline())
{
if (Device.StateOn == "A")
{
relay.set_state(YocoWrapper.YRelay.STATE_A);
}
else
{
relay.set_state(YocoWrapper.YRelay.STATE_B);
}
}
else
{
MessageBox.Show("tACS RegisterHub error: Module not connected (check USB cable).", "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{ }
}

// Check if we need to send a message to an arduino
if (Device.Arduino)
{
@@ -589,49 +536,6 @@ public override double Value
if (Device.REMDetected)
{
Device.REMDetected = false;

// Check if we need to turn off a tACS device
if (Device.tACS)
{
try
{
YocoWrapper.YRelay relay;
string errorMessage = "";

if (YocoWrapper.YAPI.RegisterHub("usb", ref errorMessage) != YocoWrapper.YAPI.SUCCESS)
{
MessageBox.Show("tACS RegisterHub error: " + errorMessage, "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

if (Device.Target == "ANY")
{
relay = YocoWrapper.YRelay.FirstRelay();
if (relay == null)
{
MessageBox.Show("tACS RegisterHub error: No module connected (check USB cable).", "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else relay = YocoWrapper.YRelay.FindRelay(Device.Target + ".relay1");

if (relay.isOnline())
{
if (Device.StateOff == "A")
{
relay.set_state(YocoWrapper.YRelay.STATE_A);
}
else
{
relay.set_state(YocoWrapper.YRelay.STATE_B);
}
}
else
{
MessageBox.Show("tACS RegisterHub error: Module not connected (check USB cable).", "LucidScribe.ThinkGearEEG.DetectREM()", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch (Exception ex)
{ }
}
}
}

Oops, something went wrong.

0 comments on commit 7e80da5

Please sign in to comment.