コード例 #1
0
        public void teleopTarget(String request)
        {
            JObject msg = JObject.Parse(request);

            switch (msg["command"].ToString().Replace("\"", ""))
            {
            case "forward":
                parent.moveForward(conf.getPublicationList());
                break;

            case "backward":
                parent.moveBackward(conf.getPublicationList());
                break;

            case "left":
                parent.moveLeft(conf.getPublicationList());
                break;

            case "right":
                parent.moveRight(conf.getPublicationList());
                break;

            case "inc_velocity":
                parent.increaseVelocity();
                break;

            case "dec_velocity":
                parent.decreaseVelocity();
                break;

            case "stop":
                parent.stopTarget(conf.getPublicationList());
                break;

            case "inc_ang":
                parent.increaseAngVelocity();
                break;

            case "dec_ang":
                parent.decreaseAngVelocity();
                break;
            }
        }
コード例 #2
0
 private void moveForward()
 {
     bridgeLogic.setCurrentVelocity(Double.Parse(txtLgth.Text));
     bridgeLogic.moveForward(bridgeConfig.getPublicationList());
     updateVelocityState();
 }