Beispiel #1
0
    public void sendCom(int boo)
    {
        string command = vis.Send(boo);

        i = boo;
        if (command.Length > 2)
        {
            var ctx = new SerData()
            {
                com = command
            };
            socket.Emit("command", JObject.FromObject(ctx));
        }
    }
Beispiel #2
0
    public void sendCom(int boo)
    {
        string command = vis.Send(boo);

        i = boo;
        if (command.Length > 2)
        {
            string[] com = command.Split('S');
            servo_no = Mathf.RoundToInt(float.Parse(com[0]));
            angle    = int.Parse(com[1]);
            Debug.Log(servo_no);
            var ctx = new SerData()
            {
                com = command
            };
            socket.Emit("command", JObject.FromObject(ctx));
        }
    }