diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs b/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs
index 585089ae..49c39fc0 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/DeviceJsonApi.cs
@@ -73,7 +73,7 @@ namespace PepperDash.Essentials.Core
CType t = obj.GetType();
// get the properties and set them into a new collection of NameType wrappers
- var props = t.GetProperties().Select(p => new PropertyNameType(p));
+ var props = t.GetProperties().Select(p => new PropertyNameType(p, obj));
return JsonConvert.SerializeObject(props, Formatting.Indented);
}
@@ -197,6 +197,27 @@ namespace PepperDash.Essentials.Core
}
return obj;
}
+
+ ///
+ /// Sets a property on an object.
+ ///
+ ///
+ ///
+ public static string SetProperty(string deviceObjectPath)
+ {
+ throw new NotImplementedException("This could be really useful. Finish it please");
+
+ //var obj = FindObjectOnPath(deviceObjectPath);
+ //if (obj == null)
+ // return "{\"error\":\"No object found\"}";
+
+ //CType t = obj.GetType();
+
+
+ //// get the properties and set them into a new collection of NameType wrappers
+ //var props = t.GetProperties().Select(p => new PropertyNameType(p, obj));
+ //return JsonConvert.SerializeObject(props, Formatting.Indented);
+ }
}
public class DeviceActionWrapper
@@ -208,14 +229,26 @@ namespace PepperDash.Essentials.Core
public class PropertyNameType
{
+ object Parent;
+
[JsonIgnore]
public PropertyInfo PropInfo { get; private set; }
public string Name { get { return PropInfo.Name; } }
public string Type { get { return PropInfo.PropertyType.Name; } }
+ public string Value { get {
+ if (PropInfo.CanRead)
+ return PropInfo.GetValue(Parent, null).ToString();
+ else
+ return "-";
+ } }
+ public bool CanRead { get { return PropInfo.CanRead; } }
+ public bool CanWrite { get { return PropInfo.CanWrite; } }
- public PropertyNameType(PropertyInfo info)
+
+ public PropertyNameType(PropertyInfo info, object parent)
{
PropInfo = info;
+ Parent = parent;
}
}
diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs b/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
index 40f8ec26..aecce485 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
@@ -29,10 +29,10 @@ namespace PepperDash.Essentials.Core
public static void Initialize(CrestronControlSystem cs)
{
- CrestronConsole.AddNewConsoleCommand(ListDeviceCommands, "devcmdlist", "Lists commands",
- ConsoleAccessLevelEnum.AccessOperator);
- CrestronConsole.AddNewConsoleCommand(DoDeviceCommand, "devcmd", "Runs a command on device - key Name value",
- ConsoleAccessLevelEnum.AccessOperator);
+ //CrestronConsole.AddNewConsoleCommand(ListDeviceCommands, "devcmdlist", "Lists commands",
+ // ConsoleAccessLevelEnum.AccessOperator);
+ //CrestronConsole.AddNewConsoleCommand(DoDeviceCommand, "devcmd", "Runs a command on device - key Name value",
+ // ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(ListDeviceCommStatuses, "devcommstatus", "Lists the communication status of all devices",
ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(ListDeviceFeedbacks, "devfb", "Lists current feedbacks",
@@ -105,7 +105,6 @@ namespace PepperDash.Essentials.Core
Debug.Console(0, "{0} Devices registered with Device Mangager:",Devices.Count);
var sorted = Devices.Values.ToList();
sorted.Sort((a, b) => a.Key.CompareTo(b.Key));
- //var devs = Devices.Values.Where(d => d is IKeyed).Select(d => d as IKeyed);
foreach (var d in sorted)
{
@@ -131,16 +130,16 @@ namespace PepperDash.Essentials.Core
statusDev.DumpFeedbacksToConsole(true);
}
- static void ListDeviceCommands(string devKey)
- {
- var dev = GetDeviceForKey(devKey);
- if (dev == null)
- {
- Debug.Console(0, "Device '{0}' not found", devKey);
- return;
- }
- Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey);
- }
+ //static void ListDeviceCommands(string devKey)
+ //{
+ // var dev = GetDeviceForKey(devKey);
+ // if (dev == null)
+ // {
+ // Debug.Console(0, "Device '{0}' not found", devKey);
+ // return;
+ // }
+ // Debug.Console(0, "This needs to be reworked. Stay tuned.", devKey);
+ //}
static void ListDeviceCommStatuses(string input)
{
@@ -154,10 +153,10 @@ namespace PepperDash.Essentials.Core
}
- static void DoDeviceCommand(string command)
- {
- Debug.Console(0, "Not yet implemented. Stay tuned");
- }
+ //static void DoDeviceCommand(string command)
+ //{
+ // Debug.Console(0, "Not yet implemented. Stay tuned");
+ //}
public static void AddDevice(IKeyed newDev)
{
@@ -167,7 +166,7 @@ namespace PepperDash.Essentials.Core
//if (existingDevice != null)
if(Devices.ContainsKey(newDev.Key))
{
- Debug.Console(0, newDev, "A device with this key already exists. Not added to manager");
+ Debug.Console(0, newDev, "WARNING: A device with this key already exists. Not added to manager");
return;
}
Devices.Add(newDev.Key, newDev);
diff --git a/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs b/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
index 446577f6..5d33afa9 100644
--- a/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
@@ -21,6 +22,12 @@ namespace PepperDash.Essentials.Core
{
public static void DumpFeedbacksToConsole(this IHasFeedback source, bool getCurrentStates)
{
+ CType t = source.GetType();
+ // get the properties and set them into a new collection of NameType wrappers
+ var props = t.GetProperties().Select(p => new PropertyNameType(p, t));
+
+
+
var feedbacks = source.Feedbacks.OrderBy(x => x.Type);
if (feedbacks != null)
{
@@ -28,32 +35,27 @@ namespace PepperDash.Essentials.Core
foreach (var f in feedbacks)
{
string val = "";
+ string type = "";
if (getCurrentStates)
{
if (f is BoolFeedback)
- val = " = " + f.BoolValue;
- else if(f is IntFeedback)
- val = " = " + f.IntValue;
- else if(f is StringFeedback)
- val = " = " + f.StringValue;
-
- //switch (f.Type)
- //{
- // case eCueType.Bool:
- // val = " = " + f.BoolValue;
- // break;
- // case eCueType.Int:
- // val = " = " + f.IntValue;
- // break;
- // case eCueType.String:
- // val = " = " + f.StringValue;
- // break;
- // //case eOutputType.Other:
- // // break;
- //}
+ {
+ val = f.BoolValue.ToString();
+ type = "boolean";
+ }
+ else if (f is IntFeedback)
+ {
+ val = f.IntValue.ToString();
+ type = "integer";
+ }
+ else if (f is StringFeedback)
+ {
+ val = f.StringValue;
+ type = "string";
+ }
}
- Debug.Console(0, "{0,-8} {1}{2}", f.GetType(),
- (string.IsNullOrEmpty(f.Cue.Name) ? "-none-" : f.Cue.Name), val);
+ Debug.Console(0, "{0,-12} {1, -25} {2}", type,
+ (string.IsNullOrEmpty(f.Cue.Name) ? "-no name-" : f.Cue.Name), val);
}
}
else
diff --git a/Essentials Core/PepperDashEssentialsBase/Feedbacks/Feedbacks.cs b/Essentials Core/PepperDashEssentialsBase/Feedbacks/Feedbacks.cs
index ee940f14..5883a320 100644
--- a/Essentials Core/PepperDashEssentialsBase/Feedbacks/Feedbacks.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Feedbacks/Feedbacks.cs
@@ -103,6 +103,11 @@ namespace PepperDash.Essentials.Core
LinkedComplementInputSigs.Remove(sig);
}
+ public override string ToString()
+ {
+ return BoolValue.ToString();
+ }
+
void UpdateSig(BoolInputSig sig)
{
sig.BoolValue = _BoolValue;
@@ -160,6 +165,11 @@ namespace PepperDash.Essentials.Core
LinkedInputSigs.Remove(sig);
}
+ public override string ToString()
+ {
+ return IntValue.ToString();
+ }
+
void UpdateSig(UShortInputSig sig)
{
sig.UShortValue = UShortValue;
@@ -212,6 +222,11 @@ namespace PepperDash.Essentials.Core
LinkedInputSigs.Remove(sig);
}
+ public override string ToString()
+ {
+ return StringValue;
+ }
+
void UpdateSig(StringInputSig sig)
{
sig.StringValue = _StringValue;
diff --git a/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs b/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs
index 12afe560..685a0c43 100644
--- a/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Monitoring/StatusMonitorBase.cs
@@ -13,10 +13,17 @@ using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
- public abstract class StatusMonitorBase : IStatusMonitor
+ public abstract class StatusMonitorBase : IStatusMonitor, IKeyName
{
public event EventHandler StatusChange;
+ ///
+ /// Format returned: "parentdevkey-comMonitor"
+ ///
+ public string Key { get { return Parent.Key + "-comMonitor"; } }
+
+ public string Name { get { return "Comm. monitor"; } }
+
public IKeyed Parent { get; private set; }
public MonitorStatus Status
@@ -102,5 +109,10 @@ namespace PepperDash.Essentials.Core
if(ErrorTimer != null)
ErrorTimer.Reset(ErrorTime, ErrorTime);
}
+
+ public void PrintStatus()
+ {
+ CrestronConsole.PrintLine("Status={0}", Status);
+ }
}
}
\ No newline at end of file
diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo
index 5732d214..35cd164d 100644
Binary files a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo and b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.projectinfo differ
diff --git a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo
index ee60b69e..00885fe7 100644
Binary files a/Essentials DM/Essentials_DM/Essentials_DM.projectinfo and b/Essentials DM/Essentials_DM/Essentials_DM.projectinfo differ
diff --git a/Essentials Devices Common/Essentials Devices Common/Display/DeviceFactory.cs b/Essentials Devices Common/Essentials Devices Common/Display/DeviceFactory.cs
index 543154d2..7c1107fe 100644
--- a/Essentials Devices Common/Essentials Devices Common/Display/DeviceFactory.cs
+++ b/Essentials Devices Common/Essentials Devices Common/Display/DeviceFactory.cs
@@ -22,13 +22,6 @@ namespace PepperDash.Essentials.Devices.Displays
var properties = dc.Properties;
var typeName = dc.Type.ToLower();
- //if (typeName == "dmmd8x8")
- //{
- // var props = JsonConvert.DeserializeObject
- // (properties.ToString());
- // return PepperDash.Essentials.DM.DmChassisController.
- // GetDmChassisController(key, name, type, props);
- //}
try
{
diff --git a/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs b/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
index 4b020868..a23a0e9f 100644
--- a/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
+++ b/Essentials Devices Common/Essentials Devices Common/Display/SamsungMDCDisplay.cs
@@ -27,6 +27,7 @@ namespace PepperDash.Essentials.Devices.Displays
ushort _VolumeLevel;
bool _IsMuted;
RoutingInputPort _CurrentInputPort;
+ byte[] IncomingBuffer = new byte[]{};
//CTimer StatusTimer;
protected override Func PowerIsOnFeedbackFunc { get { return () => _PowerIsOn; } }
@@ -85,6 +86,7 @@ namespace PepperDash.Essentials.Devices.Displays
{
WarmupTime = 10000;
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, StatusGet);
+ DeviceManager.AddDevice(CommunicationMonitor);
AddRoutingInputPort(new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.Hdmi, new Action(InputHdmi1), this), 0x21);
@@ -151,45 +153,75 @@ namespace PepperDash.Essentials.Devices.Displays
///
void Communication_BytesReceived(object sender, GenericCommMethodReceiveBytesArgs e)
{
- var b = e.Bytes;
- Debug.Console(0, this, "Parsing: {0}", ComTextHelper.GetEscapedText(b));
- if (b[0] == 0xAA && b[1] == 0xFF)
+ Debug.Console(2, this, "Socket in: {0}", ComTextHelper.GetEscapedText(e.Bytes));
+ // This is probably not thread-safe buffering
+ // Append the incoming bytes with whatever is in the buffer
+ var newBytes = new byte[IncomingBuffer.Length + e.Bytes.Length];
+ IncomingBuffer.CopyTo(newBytes, 0);
+ e.Bytes.CopyTo(newBytes, IncomingBuffer.Length);
+ Debug.Console(2, this, "Buffer+new: {0}", ComTextHelper.GetEscapedText(newBytes));
+
+ ADD A while HERE TOMORROW.
+ // If it's at least got the header, then process it,
+ if (newBytes.Length > 4 && newBytes[0] == 0xAA && newBytes[1] == 0xFF)
{
- if (b[4] == 0x41)
+ var msgLen = newBytes[3];
+ // if the buffer is shorter than the header (3) + message (msgLen) + checksum (1),
+ // give and save it for next time
+ if (newBytes.Length < msgLen + 4)
{
- var typeByte = b[5];
- switch (typeByte)
+ IncomingBuffer = newBytes;
+ return;
+ }
+
+ // Good length, grab the message
+ var message = newBytes.Skip(4).Take(msgLen).ToArray();
+ Debug.Console(0, this, "Parsing: {0}", ComTextHelper.GetEscapedText(message));
+
+ // At this point, the ack/nak is the first byte
+ if (message[0] == 0x41)
+ {
+ switch (message[1]) // type byte
{
case 0x00: // General status
- UpdatePowerFB(b[6]);
- UpdateVolumeFB(b[7]);
- UpdateMuteFb(b[8]);
- UpdateInputFb(b[9]);
+ UpdatePowerFB(message[2]);
+ UpdateVolumeFB(message[3]);
+ UpdateMuteFb(message[4]);
+ UpdateInputFb(message[5]);
break;
case 0x11:
- UpdatePowerFB(b[6]);
+ UpdatePowerFB(message[2]);
break;
case 0x12:
- UpdateVolumeFB(b[6]);
+ UpdateVolumeFB(message[2]);
break;
-
+
case 0x13:
- UpdateMuteFb(b[6]);
+ UpdateMuteFb(message[2]);
break;
case 0x14:
- UpdateInputFb(b[6]);
+ UpdateInputFb(message[2]);
break;
default:
break;
}
}
+ // Skip over what we've used and save the rest for next time
+ IncomingBuffer = newBytes.Skip(5 + msgLen).ToArray();
}
+ // there's not even a full header in the event. Save it for next time.
+ else
+ IncomingBuffer = newBytes;
}
+ ///
+ ///
+ ///
+ ///
void UpdatePowerFB(byte b)
{
var newVal = b == 1;
@@ -201,6 +233,10 @@ namespace PepperDash.Essentials.Devices.Displays
}
+ ///
+ ///
+ ///
+ ///
void UpdateVolumeFB(byte b)
{
var newVol = (ushort)Scale((double)b, 0, 100, 0, 65535);
diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
index 1c7457d4..6629539d 100644
--- a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
+++ b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
@@ -105,6 +105,7 @@
+
diff --git a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo
index ef956e6d..2cc951ac 100644
Binary files a/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo and b/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.projectinfo differ
diff --git a/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs b/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs
index 573a1dd3..f4a99b04 100644
--- a/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs
+++ b/Essentials Devices Common/Essentials Devices Common/Factory/DeviceFactory.cs
@@ -36,7 +36,6 @@ namespace PepperDash.Essentials.Devices.Common
var irCont = IRPortHelper.GetIrOutputPortController(dc);
return new AppleTV(key, name, irCont);
-
}
else if (typeName == "basicirdisplay")
@@ -46,6 +45,14 @@ namespace PepperDash.Essentials.Devices.Common
return new BasicIrDisplay(key, name, ir.Port, ir.FileName);
}
+ else if (typeName == "biamptesira")
+ {
+ var comm = CommFactory.CreateCommForDevice(dc);
+ var props = JsonConvert.DeserializeObject(
+ properties.ToString());
+ return new BiampTesiraForteDsp(key, name, comm, props);
+ }
+
else if (typeName == "cenrfgwex")
{
return CenRfgwController.GetNewExGatewayController(key, name,
@@ -58,6 +65,19 @@ namespace PepperDash.Essentials.Devices.Common
properties.Value("id"), properties.Value("gatewayType"));
}
+ else if (groupName == "discplayer") // (typeName == "irbluray")
+ {
+ if (properties["control"]["method"].Value() == "ir")
+ {
+ var irCont = IRPortHelper.GetIrOutputPortController(dc);
+ return new IRBlurayBase(key, name, irCont);
+ }
+ else if (properties["control"]["method"].Value() == "com")
+ {
+ Debug.Console(0, "[{0}] COM Device type not implemented YET!", key);
+ }
+ }
+
else if (typeName == "genericaudiooutwithvolume")
{
var zone = dc.Properties.Value("zone");
@@ -65,63 +85,39 @@ namespace PepperDash.Essentials.Devices.Common
dc.Properties.Value("volumeDeviceKey"), zone);
}
- else if (groupName == "discplayer") // (typeName == "irbluray")
- {
- if (properties["control"]["method"].Value() == "ir")
- {
- var irCont = IRPortHelper.GetIrOutputPortController(dc);
- return new IRBlurayBase(key, name, irCont);
+ else if (groupName == "genericsource")
+ {
+ return new GenericSource(key, name);
+ }
- //var ir = IRPortHelper.GetIrPort(properties);
- //if (ir != null)
- // return new IRBlurayBase(key, name, ir.Port, ir.FileName);
- }
- else if (properties["control"]["method"].Value() == "com")
- {
- Debug.Console(0, "[{0}] COM Device type not implemented YET!", key);
- }
- }
+ else if (typeName == "inroompc")
+ {
+ return new InRoomPc(key, name);
+ }
- else if (groupName == "settopbox") //(typeName == "irstbbase")
- {
- var irCont = IRPortHelper.GetIrOutputPortController(dc);
+ else if (typeName == "laptop")
+ {
+ return new Laptop(key, name);
+ }
+
+ else if (groupName == "settopbox") //(typeName == "irstbbase")
+ {
+ var irCont = IRPortHelper.GetIrOutputPortController(dc);
var config = dc.Properties.ToObject();
- var stb = new IRSetTopBoxBase(key, name, irCont, config);
+ var stb = new IRSetTopBoxBase(key, name, irCont, config);
- //stb.HasDvr = properties.Value("hasDvr");
- var listName = properties.Value("presetsList");
- if (listName != null)
- stb.LoadPresets(listName);
- return stb;
- }
+ //stb.HasDvr = properties.Value("hasDvr");
+ var listName = properties.Value("presetsList");
+ if (listName != null)
+ stb.LoadPresets(listName);
+ return stb;
+ }
- else if (typeName == "laptop")
- {
- return new Laptop(key, name);
- }
-
- else if (typeName == "inroompc")
- {
- return new InRoomPc(key, name);
- }
-
- else if (typeName == "roku")
- {
- var irCont = IRPortHelper.GetIrOutputPortController(dc);
- return new Roku2(key, name, irCont);
-
- //var ir = IRPortHelper.GetIrPort(properties);
- //if (ir != null)
- // return new Roku2(key, name, ir.Port, ir.FileName);
- }
-
- else if (typeName == "biamptesira")
- {
- var comm = CommFactory.CreateCommForDevice(dc);
- var props = JsonConvert.DeserializeObject(
- properties.ToString());
- return new BiampTesiraForteDsp(key, name, comm, props);
- }
+ else if (typeName == "roku")
+ {
+ var irCont = IRPortHelper.GetIrOutputPortController(dc);
+ return new Roku2(key, name, irCont);
+ }
return null;
}
diff --git a/Essentials Devices Common/Essentials Devices Common/Generic/GenericSource.cs b/Essentials Devices Common/Essentials Devices Common/Generic/GenericSource.cs
new file mode 100644
index 00000000..bb6d4300
--- /dev/null
+++ b/Essentials Devices Common/Essentials Devices Common/Generic/GenericSource.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.DeviceSupport;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Routing;
+
+namespace PepperDash.Essentials.Devices.Common
+{
+ public class GenericSource : Device, IUiDisplayInfo, IRoutingOutputs
+ {
+
+ public uint DisplayUiType { get { return DisplayUiConstants.TypeNoControls; } }
+
+ public GenericSource(string key, string name)
+ : base(key, name)
+ {
+
+ AnyOut = new RoutingOutputPort(RoutingPortNames.AnyOut, eRoutingSignalType.AudioVideo,
+ eRoutingPortConnectionType.Hdmi, null, this);
+ OutputPorts = new RoutingPortCollection { AnyOut };
+ }
+
+ #region IRoutingOutputs Members
+
+ public RoutingOutputPort AnyOut { get; private set; }
+ public RoutingPortCollection OutputPorts { get; private set; }
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/Config/ConfigReader.cs b/Essentials/PepperDashEssentials/Config/ConfigReader.cs
index b633f40d..75da2c2e 100644
--- a/Essentials/PepperDashEssentials/Config/ConfigReader.cs
+++ b/Essentials/PepperDashEssentials/Config/ConfigReader.cs
@@ -21,7 +21,8 @@ namespace PepperDash.Essentials
Debug.Console(0, "Using unmerged system/template configs.");
try
{
- using (StreamReader fs = new StreamReader(string.Format(@"\NVRAM\program{0}\ConfigurationFile.json", InitialParametersClass.ApplicationNumber)))
+ using (StreamReader fs = new StreamReader(string.Format(@"\NVRAM\program{0}\ConfigurationFile.json",
+ InitialParametersClass.ApplicationNumber)))
{
var doubleObj = JObject.Parse(fs.ReadToEnd());
ConfigObject = MergeConfigs(doubleObj).ToObject();
@@ -60,19 +61,22 @@ namespace PepperDash.Essentials
else
merged.Add("info", template["info"]);
- merged.Add("devices", MergeArraysOnTopLevelProperty(template["devices"] as JArray, system["devices"] as JArray, "uid"));
+ merged.Add("devices", MergeArraysOnTopLevelProperty(template["devices"] as JArray,
+ system["devices"] as JArray, "uid"));
if (system["rooms"] == null)
merged.Add("rooms", template["rooms"]);
else
- merged.Add("rooms", MergeArraysOnTopLevelProperty(template["rooms"] as JArray, system["rooms"] as JArray, "key"));
+ merged.Add("rooms", MergeArraysOnTopLevelProperty(template["rooms"] as JArray,
+ system["rooms"] as JArray, "key"));
if (system["sourceLists"] == null)
merged.Add("sourceLists", template["sourceLists"]);
else
merged.Add("sourceLists", Merge(template["sourceLists"], system["sourceLists"]));
-#warning Make tie lines merge appropriately
+ // Template tie lines take precdence. Config tool probably can't do them at system
+ // level anyway...
if (template["tieLines"] != null)
merged.Add("tieLines", template["tieLines"]);
else if (system["tieLines"] != null)
@@ -80,7 +84,7 @@ namespace PepperDash.Essentials
else
merged.Add("tieLines", new JArray());
- Debug.Console(0, "MERGED RESULT: \x0d\x0a{0}", merged);
+ //Debug.Console(0, "MERGED RESULT: \x0d\x0a{0}", merged);
return merged;
}
diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo
index 426da96b..8d1df04c 100644
Binary files a/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo and b/Essentials/PepperDashEssentials/PepperDashEssentials.projectinfo differ
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index 99a6f532..855569fc 100644
Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ
diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll
index db53b9f0..ae5cc038 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ
diff --git a/devjson commands.json b/devjson commands.json
new file mode 100644
index 00000000..6bc0e637
--- /dev/null
+++ b/devjson commands.json
@@ -0,0 +1 @@
+devjson:1 {"deviceKey":"display-1-comMonitor","methodName":"PrintStatus"}
\ No newline at end of file