Skip to content

Commit

Permalink
fix: corrects props class name and fixes duplicate jsonproperty attri…
Browse files Browse the repository at this point in the history
…bute
  • Loading branch information
ndorin committed Jun 28, 2024
1 parent 292653b commit 4199607
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Cameras/CiscoCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public CiscoCamera(string key, string name, CiscoCodec codec, uint id, uint sour
/// <param name="key"></param>
/// <param name="name"></param>
/// <param name="props"></param>
public CiscoCamera(string key, string name, CiscoCodecPropertiesConfig props)
public CiscoCamera(string key, string name, CiscoCodecCameraPropertiesConfig props)
: base(key, name)
{
SerialNumber = props.SerialNumber;
Expand Down Expand Up @@ -384,7 +384,7 @@ public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, E
}
}

public class CiscoCodecPropertiesConfig
public class CiscoCodecCameraPropertiesConfig
{
[JsonProperty("defaultParentCodecKey")]
public string DefaultParentCodecKey { get; set; }
Expand All @@ -395,7 +395,7 @@ public class CiscoCodecPropertiesConfig
[JsonProperty("serialNumber")]
public string SerialNumber { get; set; }

[JsonProperty("macAddress")]
[JsonProperty("hardwareId")]
public string HardwareID { get; set; }

[JsonProperty("macAddress")]
Expand Down
2 changes: 1 addition & 1 deletion src/Cameras/CiscoCameraFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.Console(1, "Factory Attempting to create new Cisco Camera Device");

var props = Newtonsoft.Json.JsonConvert.DeserializeObject<CiscoCodecPropertiesConfig>(dc.Properties.ToString());
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<CiscoCodecCameraPropertiesConfig>(dc.Properties.ToString());
return new CiscoCamera(dc.Key, dc.Name, props);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Interfaces/TrackingModes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ internal interface IPresenterTrack
void PresenterTrackBackground();
void PresenterTrackPersistent();
}

}

0 comments on commit 4199607

Please sign in to comment.