Ejemplo n.º 1
0
        public RangerSensorParkingSonar(string name, SensorPose pose, IAbstractRobotHardware brick, int frequency)
        {
            this.Name = name;
            this.Pose = pose;

            // reliably measured range:
            this.MinDistanceMeters = 0.0d;  // shows 0cm all right
            this.MaxDistanceMeters = 2.5d;  // shows 2.55m at infinity

            this.parkingSonar = brick.produceParkingSonar(frequency);

            parkingSonar.DistanceChanged += new HardwareComponentEventHandler(psonar_DistanceChanged);
        }
        public RangerSensorParkingSonar(string name, SensorPose pose, IAbstractRobotHardware brick, int frequency)
        {
            this.Name = name;
            this.Pose = pose;

            // reliably measured range:
            this.MinDistanceMeters = 0.0d;  // shows 0cm all right
            this.MaxDistanceMeters = 2.5d;  // shows 2.55m at infinity

            this.parkingSonar = brick.produceParkingSonar(frequency);

            parkingSonar.DistanceChanged += new HardwareComponentEventHandler(psonar_DistanceChanged);        
        }