Moved MicrophonePrivacyController to Devices Common. Fixed references

This commit is contained in:
Neil Dorin
2017-11-01 14:20:13 -06:00
parent bc47c65e48
commit a0817307b1
10 changed files with 50 additions and 23 deletions

View File

@@ -9,9 +9,9 @@ namespace PepperDash.Essentials.Core.Crestron_IO
{ {
public class GenericDigitalInputDevice : IDigitalInput public class GenericDigitalInputDevice : IDigitalInput
{ {
DigitalInput InputPort { get; private set; } public DigitalInput InputPort { get; private set; }
BoolFeedback InputStateFeedback { get; private set; } public BoolFeedback InputStateFeedback { get; private set; }
Func<bool> InputStateFeedbackFunc Func<bool> InputStateFeedbackFunc
{ {
@@ -35,5 +35,6 @@ namespace PepperDash.Essentials.Core.Crestron_IO
{ {
InputStateFeedback.FireUpdate(); InputStateFeedback.FireUpdate();
} }
} }
} }

View File

@@ -12,9 +12,9 @@ namespace PepperDash.Essentials.Core.Crestron_IO
/// </summary> /// </summary>
public class GenericVersiportInputDevice : IDigitalInput public class GenericVersiportInputDevice : IDigitalInput
{ {
Versiport InputPort { get; private set; } public Versiport InputPort { get; private set; }
BoolFeedback InputStateFeedback { get; private set; } public BoolFeedback InputStateFeedback { get; private set; }
Func<bool> InputStateFeedbackFunc Func<bool> InputStateFeedbackFunc
{ {

View File

@@ -12,7 +12,7 @@ namespace PepperDash.Essentials.Core.Crestron_IO
/// </summary> /// </summary>
public class GenericRelayDevice public class GenericRelayDevice
{ {
Relay RelayOutput { get; private set; } public Relay RelayOutput { get; private set; }
public BoolFeedback RelayStateFeedback { get; private set; } public BoolFeedback RelayStateFeedback { get; private set; }
@@ -39,17 +39,17 @@ namespace PepperDash.Essentials.Core.Crestron_IO
RelayStateFeedback.FireUpdate(); RelayStateFeedback.FireUpdate();
} }
void OpenRelay() public void OpenRelay()
{ {
RelayOutput.State = false; RelayOutput.State = false;
} }
void CloseRelay() public void CloseRelay()
{ {
RelayOutput.State = true; RelayOutput.State = true;
} }
void ToggleRelayState() public void ToggleRelayState()
{ {
if (RelayOutput.State == true) if (RelayOutput.State == true)
OpenRelay(); OpenRelay();

View File

@@ -109,7 +109,6 @@
<Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" /> <Compile Include="Crestron IO\Relay\GenericRelayDevice.cs" />
<Compile Include="Devices\CodecInterfaces.cs" /> <Compile Include="Devices\CodecInterfaces.cs" />
<Compile Include="Global\JobTimer.cs" /> <Compile Include="Global\JobTimer.cs" />
<Compile Include="Microphone Privacy\MicrophonePrivacyController.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" /> <Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" /> <Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" /> <Compile Include="Comm and IR\CommunicationExtras.cs" />

View File

@@ -57,7 +57,7 @@
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.0.15153, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.0.15153, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="PepperDash_Essentials_Core, Version=1.0.0.24289, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Essentials_Core, Version=1.0.0.24289, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

View File

@@ -61,11 +61,7 @@
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDash_Core, Version=1.0.6284.20368, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDash_Core, Version=1.0.6284.20368, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\pepperdash-simplsharp-core\Pepperdash Core\CLZ Builds\PepperDash_Core.dll</HintPath> <HintPath>..\..\..\PepperDash.Core\Pepperdash Core\Pepperdash Core\bin\PepperDash_Core.dll</HintPath>
</Reference>
<Reference Include="PepperDash_Essentials_Core, Version=1.0.0.24289, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Essentials Core\PepperDashEssentialsBase\bin\PepperDash_Essentials_Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL"> <Reference Include="SimplSharpCustomAttributesInterface, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@@ -123,6 +119,7 @@
<Compile Include="DSP\PolycomSoundStructure\SoundStructureBasics.cs" /> <Compile Include="DSP\PolycomSoundStructure\SoundStructureBasics.cs" />
<Compile Include="Factory\DeviceFactory.cs" /> <Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Generic\GenericSource.cs" /> <Compile Include="Generic\GenericSource.cs" />
<Compile Include="Microphones\MicrophonePrivacyController.cs" />
<Compile Include="Occupancy\EssentialsGlsOccupancySensorBaseController.cs" /> <Compile Include="Occupancy\EssentialsGlsOccupancySensorBaseController.cs" />
<Compile Include="Occupancy\EssentialsOccupancyAggregator.cs" /> <Compile Include="Occupancy\EssentialsOccupancyAggregator.cs" />
<Compile Include="Occupancy\iOccupancyStatusProvider.cs" /> <Compile Include="Occupancy\iOccupancyStatusProvider.cs" />
@@ -154,6 +151,12 @@
<Compile Include="VideoCodec\VideoCodecBase.cs" /> <Compile Include="VideoCodec\VideoCodecBase.cs" />
<None Include="Properties\ControlSystem.cfg" /> <None Include="Properties\ControlSystem.cfg" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Essentials Core\PepperDashEssentialsBase\PepperDash_Essentials_Core.csproj">
<Project>{A49AD6C8-FC0A-4CC0-9089-DFB4CF92D2B5}</Project>
<Name>PepperDash_Essentials_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>

View File

@@ -4,9 +4,12 @@ using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Crestron_IO; using PepperDash.Essentials.Core.Crestron_IO;
namespace PepperDash.Essentials.Core.Microphone_Privacy
namespace PepperDash.Essentials.Devices.Common.Microphones
{ {
public class MicrophonePrivacyController public class MicrophonePrivacyController
{ {
@@ -18,8 +21,6 @@ namespace PepperDash.Essentials.Core.Microphone_Privacy
public IPrivacy PrivacyDevice { get; private set; } public IPrivacy PrivacyDevice { get; private set; }
public MicrophonePrivacyController(IPrivacy privacyDevice) public MicrophonePrivacyController(IPrivacy privacyDevice)
{ {
PrivacyDevice = privacyDevice; PrivacyDevice = privacyDevice;
@@ -33,7 +34,10 @@ namespace PepperDash.Essentials.Core.Microphone_Privacy
{ {
var privacyState = (sender as IPrivacy).PrivacyModeIsOnFeedback.BoolValue; var privacyState = (sender as IPrivacy).PrivacyModeIsOnFeedback.BoolValue;
if(privacyState) if (privacyState)
TurnOnRedLeds();
else
TurnOnGreenLeds();
} }
@@ -82,5 +86,23 @@ namespace PepperDash.Essentials.Core.Microphone_Privacy
{ {
PrivacyDevice.PrivacyModeToggle(); PrivacyDevice.PrivacyModeToggle();
} }
void TurnOnRedLeds()
{
GreenLedRelay.OpenRelay();
RedLedRelay.CloseRelay();
}
void TurnOnGreenLeds()
{
RedLedRelay.CloseRelay();
GreenLedRelay.OpenRelay();
}
void TurnOffAllLeds()
{
GreenLedRelay.OpenRelay();
RedLedRelay.OpenRelay();
}
} }
} }

View File

@@ -70,10 +70,6 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath> <HintPath>..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.UI.dll</HintPath>
</Reference> </Reference>
<Reference Include="Essentials Devices Common, Version=1.0.0.18129, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Essentials Devices Common\Essentials Devices Common\bin\Essentials Devices Common.dll</HintPath>
</Reference>
<Reference Include="mscorlib" /> <Reference Include="mscorlib" />
<Reference Include="PepperDashCorePortalSync, Version=1.0.0.27069, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="PepperDashCorePortalSync, Version=1.0.0.27069, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@@ -201,6 +197,12 @@
<None Include="app.config" /> <None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" /> <None Include="Properties\ControlSystem.cfg" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Essentials Devices Common\Essentials Devices Common\Essentials Devices Common.csproj">
<Project>{892B761C-E479-44CE-BD74-243E9214AF13}</Project>
<Name>Essentials Devices Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>