Skip to content

Commit

Permalink
Merge pull request #169 from PepperDash/feature-2/adds-web-classes
Browse files Browse the repository at this point in the history
Update debugging and add web stuff
  • Loading branch information
andrew-welker authored Feb 5, 2024
2 parents 2b95857 + b13a178 commit 277dccd
Show file tree
Hide file tree
Showing 13 changed files with 1,352 additions and 68 deletions.
4 changes: 2 additions & 2 deletions src/Pepperdash Core/Config/PortalConfigReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static JObject MergeConfigs(JObject doubleConfig)
merged.Add("info", template["info"]);

merged.Add("devices", MergeArraysOnTopLevelProperty(template["devices"] as JArray,
system["devices"] as JArray, "uid", "devices"));
system["devices"] as JArray, "key", "devices"));

if (system["rooms"] == null)
merged.Add("rooms", template["rooms"]);
Expand Down Expand Up @@ -117,7 +117,7 @@ public static JObject MergeConfigs(JObject doubleConfig)
else
merged.Add("global", template["global"]);

Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
//Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
return merged;
}

Expand Down
10 changes: 6 additions & 4 deletions src/Pepperdash Core/CoreInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Serilog;

namespace PepperDash.Core
{
Expand All @@ -15,16 +16,17 @@ public interface IKeyed
/// Unique Key
/// </summary>
string Key { get; }
}
}

/// <summary>
/// Named Keyed device interface. Forces the devie to have a Unique Key and a name.
/// Named Keyed device interface. Forces the device to have a Unique Key and a name.
/// </summary>
public interface IKeyName : IKeyed
{
{
/// <summary>
/// Isn't it obvious :)
/// </summary>
string Name { get; }
}
}

}
5 changes: 4 additions & 1 deletion src/Pepperdash Core/Device.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Serilog;
using Serilog.Core;
using Serilog.Sinks.SystemConsole;

namespace PepperDash.Core
{
Expand All @@ -10,6 +13,7 @@ namespace PepperDash.Core
/// </summary>
public class Device : IKeyName
{

/// <summary>
/// Unique Key
/// </summary>
Expand Down Expand Up @@ -51,7 +55,6 @@ public Device(string key)
Key = key;
if (key.Contains('.')) Debug.Console(0, this, "WARNING: Device name's should not include '.'");
Name = "";

}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public void EvaluateFile(string filepath)
/// Sets the debug level
/// </summary>
/// <param name="level"></param>
public void setDebugLevel(int level)
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ FileInfo GetActualFileInfoFromPath(string path)
///
/// </summary>
/// <param name="level"></param>
public void setDebugLevel(int level)
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
}
Expand Down
Loading

0 comments on commit 277dccd

Please sign in to comment.