Generic LightingBRidge. Adds a check for 0 values. Now recalls Analog scene value - 1

This commit is contained in:
Jason T Alborough
2019-03-06 15:49:20 -05:00
parent 1bb9bfab70
commit 6253d4becf

View File

@@ -27,7 +27,8 @@ namespace PepperDash.Essentials.Bridges
Debug.Console(0, "Linking to lighting Type {0}", lightingDevice.GetType().Name.ToString());
// GenericLighitng Actions & FeedBack
trilist.SetUShortSigAction(joinMap.SelectScene, u => lightingDevice.SelectScene(lightingDevice.LightingScenes[u]));
trilist.SetUShortSigAction(joinMap.SelectScene, u => {if(u > 0) { lightingDevice.SelectScene(lightingDevice.LightingScenes[u-1]);}});
int sceneIndex = 1;
foreach (var scene in lightingDevice.LightingScenes)