Exemple #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 9: {
                    Ts = input.ReadDouble();
                    break;
                }

                case 17: {
                    BrakeDeadzone = input.ReadDouble();
                    break;
                }

                case 25: {
                    ThrottleDeadzone = input.ReadDouble();
                    break;
                }

                case 33: {
                    SpeedControllerInputLimit = input.ReadDouble();
                    break;
                }

                case 41: {
                    StationErrorLimit = input.ReadDouble();
                    break;
                }

                case 49: {
                    PreviewWindow = input.ReadDouble();
                    break;
                }

                case 57: {
                    StandstillAcceleration = input.ReadDouble();
                    break;
                }

                case 66: {
                    if (stationPidConf_ == null)
                    {
                        stationPidConf_ = new global::Apollo.Control.PidConf();
                    }
                    input.ReadMessage(stationPidConf_);
                    break;
                }

                case 74: {
                    if (lowSpeedPidConf_ == null)
                    {
                        lowSpeedPidConf_ = new global::Apollo.Control.PidConf();
                    }
                    input.ReadMessage(lowSpeedPidConf_);
                    break;
                }

                case 82: {
                    if (highSpeedPidConf_ == null)
                    {
                        highSpeedPidConf_ = new global::Apollo.Control.PidConf();
                    }
                    input.ReadMessage(highSpeedPidConf_);
                    break;
                }

                case 89: {
                    SwitchSpeed = input.ReadDouble();
                    break;
                }

                case 98: {
                    if (reverseStationPidConf_ == null)
                    {
                        reverseStationPidConf_ = new global::Apollo.Control.PidConf();
                    }
                    input.ReadMessage(reverseStationPidConf_);
                    break;
                }

                case 106: {
                    if (reverseSpeedPidConf_ == null)
                    {
                        reverseSpeedPidConf_ = new global::Apollo.Control.PidConf();
                    }
                    input.ReadMessage(reverseSpeedPidConf_);
                    break;
                }

                case 114: {
                    if (pitchAngleFilterConf_ == null)
                    {
                        pitchAngleFilterConf_ = new global::Apollo.Control.FilterConf();
                    }
                    input.ReadMessage(pitchAngleFilterConf_);
                    break;
                }

                case 122: {
                    if (calibrationTable_ == null)
                    {
                        calibrationTable_ = new global::Apollo.Control.Calibrationtable.ControlCalibrationTable();
                    }
                    input.ReadMessage(calibrationTable_);
                    break;
                }
                }
            }
        }
Exemple #2
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);
     }
 }