Ejemplo n.º 1
0
 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);
     }
 }