Set all lights in the UI when previewing light colors.
This commit is contained in:
parent
3d5be3017b
commit
776baf1aca
@ -518,7 +518,7 @@ namespace smx_config
|
|||||||
color = config.stepColor;
|
color = config.stepColor;
|
||||||
for( int iPanel = 0; iPanel < 9; ++iPanel )
|
for( int iPanel = 0; iPanel < 9; ++iPanel )
|
||||||
{
|
{
|
||||||
for( int i = 0; i < 16; ++i )
|
for( int i = 0; i < 25; ++i )
|
||||||
{
|
{
|
||||||
// Auto-lights colors in the config packet are scaled so the firmware
|
// 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
|
// doesn't have to do it, but here we're setting the panel color to
|
||||||
@ -531,7 +531,7 @@ namespace smx_config
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SMX.SMX.SetLights(cmd.Get());
|
SMX.SMX.SetLights2(cmd.Get());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ namespace SMX
|
|||||||
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern bool SMX_GetTestData(int pad, out SMXSensorTestModeData data);
|
private static extern bool SMX_GetTestData(int pad, out SMXSensorTestModeData data);
|
||||||
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
private static extern bool SMX_SetLights(byte[] buf);
|
private static extern bool SMX_SetLights2(byte[] buf, int lightDataSize);
|
||||||
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
[DllImport("SMX.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||||
private static extern IntPtr SMX_Version();
|
private static extern IntPtr SMX_Version();
|
||||||
|
|
||||||
@ -441,13 +441,11 @@ namespace SMX
|
|||||||
SMX_ForceRecalibration(pad);
|
SMX_ForceRecalibration(pad);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetLights(byte[] buf)
|
public static void SetLights2(byte[] buf)
|
||||||
{
|
{
|
||||||
if(!DLLAvailable()) return;
|
if(!DLLAvailable()) return;
|
||||||
|
|
||||||
if(buf.Length != 9*16*3*2)
|
SMX_SetLights2(buf, buf.Length);
|
||||||
throw new Exception("SetLights buffer has an invalid length: " + buf.Length);
|
|
||||||
SMX_SetLights(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SMXPanelAnimation
|
// SMXPanelAnimation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user