mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
feat(wip): still working on re-arranging base classes
This commit is contained in:
@@ -2,24 +2,9 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharp.CrestronIO;
|
|
||||||
using Crestron.SimplSharpPro;
|
|
||||||
using Crestron.SimplSharpPro.GeneralIO;
|
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
|
|
||||||
using Full.Newtonsoft.Json;
|
|
||||||
using Full.Newtonsoft.Json.Linq;
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
|
||||||
|
|
||||||
using PepperDash.Essentials.Devices.Common;
|
|
||||||
using PepperDash.Essentials.Devices.Common.DSP;
|
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
|
||||||
using PepperDash.Essentials.Devices.Common.Environment;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common
|
namespace PepperDash.Essentials.Devices.Common
|
||||||
{
|
{
|
||||||
@@ -1,16 +1,12 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.CrestronIO;
|
using PepperDash.Essentials.Core.CrestronIO;
|
||||||
using PepperDash.Essentials.Core.Shades;
|
using PepperDash.Essentials.Core.Shades;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
|
namespace PepperDash.Essentials.Devices.Common.Shades
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controls a single shade using three relays
|
/// Controls a single shade using three relays
|
||||||
@@ -122,9 +118,9 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
|
|||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
|
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
|
||||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<Environment.Somfy.RelayControlledShadeConfigProperties>(dc.Properties.ToString());
|
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<RelayControlledShadeConfigProperties>(dc.Properties.ToString());
|
||||||
|
|
||||||
return new Environment.Somfy.RelayControlledShade(dc.Key, dc.Name, props);
|
return new RelayControlledShade(dc.Key, dc.Name, props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
|
using PepperDash.Essentials.Core.Shades;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Shades
|
namespace PepperDash.Essentials.Devices.Common.Shades
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class that contains the shades to be controlled in a room
|
/// Class that contains the shades to be controlled in a room
|
||||||
@@ -40,7 +37,7 @@ namespace PepperDash.Essentials.Core.Shades
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddShade(ShadeBase shade)
|
void AddShade(IShadesOpenCloseStop shade)
|
||||||
{
|
{
|
||||||
Shades.Add(shade);
|
Shades.Add(shade);
|
||||||
}
|
}
|
||||||
@@ -67,9 +64,9 @@ namespace PepperDash.Essentials.Core.Shades
|
|||||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Factory Attempting to create new ShadeController Device");
|
Debug.Console(1, "Factory Attempting to create new ShadeController Device");
|
||||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<Core.Shades.ShadeControllerConfigProperties>(dc.Properties.ToString());
|
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<ShadeControllerConfigProperties>(dc.Properties.ToString());
|
||||||
|
|
||||||
return new Core.Shades.ShadeController(dc.Key, dc.Name, props);
|
return new ShadeController(dc.Key, dc.Name, props);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8,7 +8,6 @@ using PepperDash.Core;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Shades;
|
using PepperDash.Essentials.Core.Shades;
|
||||||
using PepperDash.Essentials.Devices.Common.Environment.Somfy;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user