public CarWithFakeRegulators(CarController parent) { Controller = parent; CarInfo = new CarInformations(); SteeringWheelAngleRegulator = new FakeSteeringWheelRegulator(); SpeedRegulator = new FakeSpeedRegulator(); BrakeRegulator = new FakeBrakeRegulator(); CarComunicator = new RealCarCommunicator(this); }
public CarWithFakeCommunicator(CarController parent) { Controller = parent; CarInfo = new CarInformations(); CarComunicator = new FakeCarCommunicator(this); SteeringWheelAngleRegulator = new PIDSteeringWheelAngleRegulator(this); SpeedRegulator = new PIDSpeedRegulator(this); BrakeRegulator = new PIDBrakeRegulator(this); CarComunicator.InitRegulatorsEventsHandling(); }
public MainWindow() { Controller = new CarController(this); InitializeComponent(); ExternalEventsHandlingInit(); this.KeyDown += new KeyEventHandler(MainWindow_KeyDown); //initialize timer mTimer.Interval = TIMER_INTERVAL_IN_MS; mTimer.Tick += new EventHandler(mTimer_Tick); mTimer.Start(); }