Catch/Log if Serial Ports fail to open

This commit is contained in:
Kylemc1413
2022-05-24 20:50:44 -04:00
parent 05da9f6caa
commit bd68e0a1ff
+9 -2
View File
@@ -35,8 +35,15 @@ public class Serial : MonoBehaviour
bool StartUp = false;
void Start()
{
ComL.Open();
ComR.Open();
try
{
ComL.Open();
ComR.Open();
}
catch (Exception ex)
{
Console.WriteLine($"Failed to Open Serial Ports: {ex}");
}
Debug.Log("Touch Serial Initializing..");
SetSettingData_160();
SetSettingData_201();