void car_evTargetSteeringWheelAngleChanged(object sender, TargetSteeringWheelAngleChangedEventArgs args) { double calculatedSteering = regulator.SetTargetValue(args.GetTargetWheelAngle()); NewSteeringWheelSettingCalculatedEventHandler newWheelSteeringCalculatedEvent = evNewSteeringWheelSettingCalculated; if (newWheelSteeringCalculatedEvent != null) { newWheelSteeringCalculatedEvent(this, new NewSteeringWheelSettingCalculateddEventArgs(calculatedSteering)); } }
void CarComunicator_evSteeringWheelAngleInfoReceived(object sender, SteeringWheelAngleInfoReceivedEventArgs args) { double calculatedSteering = regulator.ProvideObjectCurrentValueToRegulator(args.GetAngle()); NewSteeringWheelSettingCalculatedEventHandler newWheelSteeringCalculatedEvent = evNewSteeringWheelSettingCalculated; if (newWheelSteeringCalculatedEvent != null) { newWheelSteeringCalculatedEvent(this, new NewSteeringWheelSettingCalculateddEventArgs(calculatedSteering)); } }