mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
fix: clears joinMap.Joins and rebuilds with matching IR commands of the file loaded
This commit is contained in:
@@ -80,21 +80,29 @@ namespace PepperDash.Essentials.Core.Devices
|
|||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Failed to link new IR bridge join map");
|
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Failed to link new IR bridge join map");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
joinMap.Joins.Clear();
|
||||||
|
|
||||||
foreach (var bridgeJoin in bridgeJoins)
|
foreach (var bridgeJoin in bridgeJoins)
|
||||||
{
|
{
|
||||||
|
var key = bridgeJoin.Key;
|
||||||
|
var joinDataKey = bridgeJoin.Value.Key;
|
||||||
|
var joinDataValue = bridgeJoin.Value.Value;
|
||||||
|
var joinNumber = bridgeJoin.Value.Value.JoinNumber;
|
||||||
|
|
||||||
Debug.Console(2, this, @"bridgeJoin: Key-'{0}'
|
Debug.Console(2, this, @"bridgeJoin: Key-'{0}'
|
||||||
Value.Key-'{1}'
|
Value.Key-'{1}'
|
||||||
Value.JoinNumber-'{2}'
|
Value.JoinNumber-'{2}'
|
||||||
Value.Metadata.Description-'{3}'",
|
Value.Metadata.Description-'{3}'",
|
||||||
bridgeJoin.Key,
|
key,
|
||||||
bridgeJoin.Value.Key,
|
joinDataKey,
|
||||||
bridgeJoin.Value.Value.JoinNumber,
|
joinNumber,
|
||||||
bridgeJoin.Value.Value.Metadata.Description);
|
joinDataValue.Metadata.Description);
|
||||||
|
|
||||||
var joinNumber = bridgeJoin.Value.Value.JoinNumber;
|
|
||||||
var joinCmd = bridgeJoin.Key;
|
|
||||||
|
|
||||||
trilist.SetBoolSigAction(joinNumber, (b) => Press(joinCmd, b));
|
joinMap.Joins.Add(key, joinDataValue);
|
||||||
|
|
||||||
|
trilist.SetBoolSigAction(joinNumber, (b) => Press(key, b));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user