public SerialCarHardwareInterface(String portPath) { // For now, we're hardcoding our sensors. RearUltrasonicSensor = new UltrasonicSensor(); FrontUltrasonicSensors = new UltrasonicSensor[] { new UltrasonicSensor(), new UltrasonicSensor(), new UltrasonicSensor() }; Accelerometor = new AccelerometorSensor(); ThrottleServo = new Servo(this); SteeringServo = new Servo(this); StartSerialPortConnection(); }
public DistancesInfoScreen([ReadOnlyArray()] UltrasonicSensor[] frontSensors, UltrasonicSensor rearSensor) { FrontSensors = (UltrasonicSensor[])frontSensors.Clone(); RearSensor = rearSensor; }