//public int WallSensorMaxDistance { get; } public LineAndWallDetectorRobot(IEnvironment env, int wallSensorMaxDistance = 100, int minMapValueForObstacle = 10) : base(env) { //this.WallSensorMaxDistance = wallSensorMaxDistance; this.minMapValueForObstacle = minMapValueForObstacle; LineSensor = new LineSensor(this); }
public LineAndWallDetectorRobot(IEnvironment env, int wallSensorMaxDistance = 20, int minMapValueForObstacle = 10) : base(env) { this.wallSensorMaxDistance = wallSensorMaxDistance; this.minMapValueForObstacle = minMapValueForObstacle; LineSensor = new LineSensor(this); LeftWallSensor = new FixedDistanceSensor(this, -90.0, this.minMapValueForObstacle, this.wallSensorMaxDistance); RightWallSensor = new FixedDistanceSensor(this, 90.0, this.minMapValueForObstacle, this.wallSensorMaxDistance); }
private void PollLineSensor() { UpdateSensorStatus(LineSensor.Scan().Max() > 0, ref lastLineStatus, OnLineAppears, OnLineDisappears); }