From 6e09b2ea53d8ba388dc74dfd0573f47f0459717e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 27 Oct 2018 17:45:37 -0500 Subject: [PATCH] Fix the auto-lights preview when dragging the color slider being dimmer than the actual auto-lights. --- smx-config/Helpers.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/smx-config/Helpers.cs b/smx-config/Helpers.cs index c8810ec..37331a8 100644 --- a/smx-config/Helpers.cs +++ b/smx-config/Helpers.cs @@ -334,12 +334,17 @@ namespace smx_config { for( int i = 0; i < 16; ++i ) { - cmd.Write( color[iPanel*3+0] ); - cmd.Write( color[iPanel*3+1] ); - cmd.Write( color[iPanel*3+2] ); + // Auto-lights colors in the config packet are scaled so the firmware + // doesn't have to do it, but here we're setting the panel color to + // the auto-light color directly to preview the color. SetLights + // will apply the scaling, so we need to remove it. + cmd.Write( Helpers.UnscaleColor(color[iPanel*3+0]) ); + cmd.Write( Helpers.UnscaleColor(color[iPanel*3+1]) ); + cmd.Write( Helpers.UnscaleColor(color[iPanel*3+2]) ); } } } + SMX.SMX.SetLights(cmd.Get()); } };