From fe646ee284583fa947db405705c3c10abec1b152 Mon Sep 17 00:00:00 2001 From: "Hyunseok Yang (YG)" Date: Wed, 18 Dec 2024 17:33:23 +0900 Subject: [PATCH] modify ProcessDevice() in MicomCommand() - change order of processing command -> -> --- Assets/Scripts/Devices/MicomCommand.cs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Assets/Scripts/Devices/MicomCommand.cs b/Assets/Scripts/Devices/MicomCommand.cs index 919f5b21..577c904d 100644 --- a/Assets/Scripts/Devices/MicomCommand.cs +++ b/Assets/Scripts/Devices/MicomCommand.cs @@ -69,21 +69,23 @@ protected override void ProcessDevice() } else { - var customCmd = receivedMessage.GetMessage(); - if (customCmd != null) + var joystick = receivedMessage.GetMessage(); + if (joystick != null) { - if (customCmd.Name.StartsWith("mowing")) - { - ControlMowing(customCmd.Name, customCmd.Value); - } + ControlJoystick(joystick); } else { - var joystick = receivedMessage.GetMessage(); - - if (joystick != null) + var customCmd = receivedMessage.GetMessage(); + if (customCmd != null) { - ControlJoystick(joystick); + if (customCmd.Name.StartsWith("mowing")) + { + ControlMowing(customCmd.Name, customCmd.Value); + } + else if (customCmd.Name.StartsWith("display")) + { + } } #if UNITY_EDITOR else