Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[BUG]-PepperDash.Essentials.Core.Lighting.LightingBase SceneIndex

Open jonnyarndt opened this issue 4 years ago • 0 comments

Was this bug identified in a specific build version? ForEach loop within PepperDash.Essentials.Core.Lighting.LightingBase not evaluating correctly for LAMDA function.

Describe the bug sceneIndex within the PepperDash.Essentials.Core.Lighting.LightingBase seems to always evaluate to the scene count which seems to break the LAMBDA function called when a scene is later triggered.

Stacktrace AV4>[01:10:46.406]App 1:[lighting-bridge-1] EiscApiAdvanced change: Bool 61=True [01:10:46.406]App 1:[lighting-bridge-1] Executing Action: System.Action1[System.Boolean] [01:10:46.413]App 1:[lighting-bridge-1] Error in Eisc_SigChange handler: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index at System.Collections.Generic.List1[T].get_Item (System.Int32 index) [0x00009] in <2ad40006e9c141b299c9c7c533021a74>:0 at PepperDash.Essentials.Core.Lighting.LightingBase+<>c__DisplayClass6.<LinkLightingToApi>b__4 () [0x00011] in <671e7a6f934244b09d7062cd5fdc9127>:0 at PepperDash.Essentials.Core.SigAndTriListExtensions+<>c__DisplayClass1.<SetSigTrueAction>b__0 (System.Boolean b) [0x00003] in <671e7a6f934244b09d7062cd5fdc9127>:0 at PepperDash.Essentials.Core.Bridges.EiscApiAdvanced.Eisc_SigChange (System.Object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) [0x0009a] in <671e7a6f934244b09d7062cd5fdc9127>:0 [01:10:46.594]App 1:[lighting-bridge-1] EiscApiAdvanced change: Bool 61=False [01:10:46.594]App 1:[lighting-bridge-1] Executing Action: System.Action`1[System.Boolean]

To Reproduce None

Expected behavior sceneIndex requires local context within the ForEach.

Screenshots Resolved using screenshot example below. image

Additional context None

jonnyarndt avatar Feb 17 '22 06:02 jonnyarndt