예제 #1
0
        public CRobotStatus GetCopyOfRobotStatus()
        {
            CRobotStatus cRobotStatus = new CRobotStatus();

            cRobotStatus.SetAndCheckSWs(robotStatus.sw1, robotStatus.sw2);
            return(cRobotStatus);
        }
예제 #2
0
        private void SendStatus(CRobotStatus status)
        {
            if (!isConnected || client == null)
            {
                return;
            }

            client.EmitAsync("fromRobot-status", status);
        }
예제 #3
0
        private void StatusChanged(object sender, EventArgs e)
        {
            if (xrc == null)
            {
                return;
            }

            WriteLine("    XRC Status: " + xrc.RobotStatusJson);

            CRobotStatus status = xrc.GetCopyOfRobotStatus();

            if (!status.isTeach && status.isServoOn)
            {
                btnUp.Enabled      = true;
                btnDown.Enabled    = true;
                btnHomePos.Enabled = true;
                button2.Enabled    = true;
                button3.Enabled    = true;
                button4.Enabled    = true;
                button5.Enabled    = true;
                button6.Enabled    = true;
                button1.Enabled    = true;
                button8.Enabled    = true;
            }
            else
            {
                btnUp.Enabled      = false;
                btnDown.Enabled    = false;
                btnHomePos.Enabled = false;
                button2.Enabled    = false;
                button3.Enabled    = false;
                button4.Enabled    = false;
                button5.Enabled    = false;
                button6.Enabled    = false;
                button1.Enabled    = false;
                button8.Enabled    = false;
            }
        }