1
0
mirror of synced 2025-02-17 11:18:32 +01:00

fix not using ipc issue again; add ipc enable flag to mercuryio

This commit is contained in:
xpeng 2022-08-02 00:09:41 +02:00
parent b1a9bcef7c
commit 17dc18e2e5
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ public class LightManager : MonoBehaviour
for (int i = 0; i < Lights.Count; i++)
Materials.Add(Lights[i].GetComponent<Renderer>().material);
if (useIPC)
if (useIPC_Config)
{
InitializeIPC("Local\\WACVR_SHARED_BUFFER", 2164);
RGBColor2D = new Texture2D(480, 1, TextureFormat.RGBA32, false);
@ -38,6 +38,7 @@ public class LightManager : MonoBehaviour
}
private void Update()
{
GetTextureFromBytes(GetBytesFromMemory());
if (useIPC_Config)
CheckIPCState();
if (useIPC)
@ -61,7 +62,6 @@ public class LightManager : MonoBehaviour
}
private void UpdateLED()
{
GetTextureFromBytes(GetBytesFromMemory());
int index = 0;
for (int i = 0; i < 30; i++)
{

View File

@ -137,6 +137,7 @@ void mercury_io_touch_set_leds(struct led_data data)
{
if (FileMapping)
{
data.rgba[3] = 0xFF; //IPC enable flag
memcpy(FileMapping->RGBAData, data.rgba, 480 * 4);
}
//for (size_t i = 0; i < 32; i++)