public void MergeFrom(LonControllerConf other) { if (other == null) { return; } if (other.Ts != 0D) { Ts = other.Ts; } if (other.BrakeDeadzone != 0D) { BrakeDeadzone = other.BrakeDeadzone; } if (other.ThrottleDeadzone != 0D) { ThrottleDeadzone = other.ThrottleDeadzone; } if (other.SpeedControllerInputLimit != 0D) { SpeedControllerInputLimit = other.SpeedControllerInputLimit; } if (other.StationErrorLimit != 0D) { StationErrorLimit = other.StationErrorLimit; } if (other.PreviewWindow != 0D) { PreviewWindow = other.PreviewWindow; } if (other.StandstillAcceleration != 0D) { StandstillAcceleration = other.StandstillAcceleration; } if (other.stationPidConf_ != null) { if (stationPidConf_ == null) { stationPidConf_ = new global::Apollo.Control.PidConf(); } StationPidConf.MergeFrom(other.StationPidConf); } if (other.lowSpeedPidConf_ != null) { if (lowSpeedPidConf_ == null) { lowSpeedPidConf_ = new global::Apollo.Control.PidConf(); } LowSpeedPidConf.MergeFrom(other.LowSpeedPidConf); } if (other.highSpeedPidConf_ != null) { if (highSpeedPidConf_ == null) { highSpeedPidConf_ = new global::Apollo.Control.PidConf(); } HighSpeedPidConf.MergeFrom(other.HighSpeedPidConf); } if (other.SwitchSpeed != 0D) { SwitchSpeed = other.SwitchSpeed; } if (other.reverseStationPidConf_ != null) { if (reverseStationPidConf_ == null) { reverseStationPidConf_ = new global::Apollo.Control.PidConf(); } ReverseStationPidConf.MergeFrom(other.ReverseStationPidConf); } if (other.reverseSpeedPidConf_ != null) { if (reverseSpeedPidConf_ == null) { reverseSpeedPidConf_ = new global::Apollo.Control.PidConf(); } ReverseSpeedPidConf.MergeFrom(other.ReverseSpeedPidConf); } if (other.pitchAngleFilterConf_ != null) { if (pitchAngleFilterConf_ == null) { pitchAngleFilterConf_ = new global::Apollo.Control.FilterConf(); } PitchAngleFilterConf.MergeFrom(other.PitchAngleFilterConf); } if (other.calibrationTable_ != null) { if (calibrationTable_ == null) { calibrationTable_ = new global::Apollo.Control.Calibrationtable.ControlCalibrationTable(); } CalibrationTable.MergeFrom(other.CalibrationTable); } }
public override int GetHashCode() { int hash = 1; if (Ts != 0D) { hash ^= Ts.GetHashCode(); } if (BrakeDeadzone != 0D) { hash ^= BrakeDeadzone.GetHashCode(); } if (ThrottleDeadzone != 0D) { hash ^= ThrottleDeadzone.GetHashCode(); } if (SpeedControllerInputLimit != 0D) { hash ^= SpeedControllerInputLimit.GetHashCode(); } if (StationErrorLimit != 0D) { hash ^= StationErrorLimit.GetHashCode(); } if (PreviewWindow != 0D) { hash ^= PreviewWindow.GetHashCode(); } if (StandstillAcceleration != 0D) { hash ^= StandstillAcceleration.GetHashCode(); } if (stationPidConf_ != null) { hash ^= StationPidConf.GetHashCode(); } if (lowSpeedPidConf_ != null) { hash ^= LowSpeedPidConf.GetHashCode(); } if (highSpeedPidConf_ != null) { hash ^= HighSpeedPidConf.GetHashCode(); } if (SwitchSpeed != 0D) { hash ^= SwitchSpeed.GetHashCode(); } if (reverseStationPidConf_ != null) { hash ^= ReverseStationPidConf.GetHashCode(); } if (reverseSpeedPidConf_ != null) { hash ^= ReverseSpeedPidConf.GetHashCode(); } if (pitchAngleFilterConf_ != null) { hash ^= PitchAngleFilterConf.GetHashCode(); } if (calibrationTable_ != null) { hash ^= CalibrationTable.GetHashCode(); } return(hash); }