mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 20:17:03 +00:00
Updates all Bridge types to properly support custom join maps from config. Corrects issues in DisplayControllerBridge due to static properties outside of LinkToApi method. (ECS-1153)
This commit is contained in:
parent
87de4a4bf0
commit
78fe799afc
39 changed files with 627 additions and 525 deletions
|
|
@ -10,16 +10,20 @@ using PepperDash.Core;
|
|||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Bridges
|
||||
{
|
||||
public static class DmpsAudioOutputControllerApiExtensions
|
||||
{
|
||||
public static void LinkToApi(this DmpsAudioOutputController dmAudioOutputController, BasicTriList trilist, uint joinStart, string joinMapKey)
|
||||
{
|
||||
var joinMap = JoinMapHelper.GetJoinMapForDevice(joinMapKey) as DmpsAudioOutputControllerJoinMap;
|
||||
DmpsAudioOutputControllerJoinMap joinMap = new DmpsAudioOutputControllerJoinMap();
|
||||
|
||||
if (joinMap == null)
|
||||
joinMap = new DmpsAudioOutputControllerJoinMap();
|
||||
var joinMapSerialized = JoinMapHelper.GetJoinMapForDevice(joinMapKey);
|
||||
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
joinMap = JsonConvert.DeserializeObject<DmpsAudioOutputControllerJoinMap>(joinMapSerialized);
|
||||
|
||||
joinMap.OffsetJoinNumbers(joinStart);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue