Adds WriteControlProperty to ReconfigurableDevice

CameraBase now uses ReconfigurableDevice
This commit is contained in:
Jason T Alborough
2021-05-11 15:20:35 -04:00
parent 6b7c5c01f8
commit 8d215930d9
2 changed files with 24 additions and 6 deletions

View File

@@ -7,6 +7,8 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace PepperDash.Essentials.Core.Devices
{
@@ -52,6 +54,12 @@ namespace PepperDash.Essentials.Core.Devices
Name = config.Name;
}
protected virtual void WriteControlProperty(JToken controlObject)
{
Config.Properties["control"] = JToken.FromObject(controlObject);
CustomSetConfig(Config);
}
/// <summary>
/// Used by the extending class to allow for any custom actions to be taken (tell the ConfigWriter to write config, etc)
/// </summary>