1
0
mirror of synced 2024-11-24 06:40:11 +01:00

Only read if SerialPorts are open

This commit is contained in:
Kylemc1413 2022-05-22 09:34:23 -04:00
parent 3cb2990ef0
commit f8098433c9

View File

@ -50,8 +50,10 @@ public class Serial : MonoBehaviour
// Update is called once per frame
void Update()
{
ReadHead(ComL, 0);
ReadHead(ComR, 1);
if(ComL.IsOpen)
ReadHead(ComL, 0);
if (ComR.IsOpen)
ReadHead(ComR, 1);
//SendTouch(ComL, TouchPackL);
//SendTouch(ComR, TouchPackR);
if (Input.GetKeyDown(KeyCode.M))