WIP - microphone in use detection

This commit is contained in:
2021-04-16 21:38:38 -04:00
parent 6fec068715
commit e1ca9f67ac
13 changed files with 116 additions and 538 deletions

View File

@@ -154,7 +154,7 @@ namespace WorkIndicator.Delcom
{
try
{
if (!_deviceHandle.IsClosed)
if (_deviceHandle != null && !_deviceHandle.IsClosed)
_deviceHandle.Close();
return 0;

View File

@@ -1,6 +1,6 @@
using System;
using Common.Extensions;
using Common.Extensions;
using System;
using System.Diagnostics;
namespace WorkIndicator.Delcom
{
@@ -80,6 +80,8 @@ namespace WorkIndicator.Delcom
_yellow = yellow;
_green = green;
Debug.WriteLine($"Red: {_red}, Yellow: {_yellow}, Green: {_green}");
port1 = port1.SetBitValue((int) Light.Green, green == LightState.Off);
port1 = port1.SetBitValue((int) Light.Yellow, yellow == LightState.Off);
port1 = port1.SetBitValue((int) Light.Red, red == LightState.Off);