aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs')
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs572
1 files changed, 0 insertions, 572 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs
deleted file mode 100644
index 28659d7af..000000000
--- a/Software/Visual_Studio/Tango.PMR/Hardware/Motor.cs
+++ /dev/null
@@ -1,572 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: Motor.proto
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.Protobuf;
-using pbc = global::Google.Protobuf.Collections;
-using pbr = global::Google.Protobuf.Reflection;
-using scg = global::System.Collections.Generic;
-namespace Tango.PMR.Hardware {
-
- /// <summary>Holder for reflection information generated from Motor.proto</summary>
- public static partial class MotorReflection {
-
- #region Descriptor
- /// <summary>File descriptor for Motor.proto</summary>
- public static pbr::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbr::FileDescriptor descriptor;
-
- static MotorReflection() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "CgtNb3Rvci5wcm90bxISVGFuZ28uUE1SLkhhcmR3YXJlIskCCgtNb3RvckNv",
- "bmZpZxInCgJJZBgBIAEoDjIbLlRhbmdvLlBNUi5IYXJkd2FyZS5Nb3Rvcklk",
- "Eg8KB01pbkZyZXEYAiABKA0SDwoHTWF4RnJlcRgDIAEoDRIUCgxNaW5taWNy",
- "b1N0ZXAYBCABKA0SFAoMTWF4bWljcm9TdGVwGAUgASgNEhMKC0xpbmVhclJh",
- "dGlvGAYgASgBEhYKDk1lZGlhblBvc2l0aW9uGAcgASgNEhYKDkNvcnJlY3Rp",
- "b25HYWluGAggASgBEhgKEFJhdGlvMkRyeWVyU3BlZWQYCSABKAESCgoCS3AY",
- "CiABKAESCgoCS2kYCyABKAESCgoCS2QYDCABKAESEwoLQ2hhbmdlU2xvcGUY",
- "DSABKAESFgoOSGlnaExlbmd0aHVTZWMYDiABKAESEwoLU3BlZWRLZWVwZXIY",
- "DyABKAgqOAoHTW90b3JJZBIKCgZGZWVkZXIQABIJCgVEcnllchABEgoKBlBv",
- "b2xlchACEgoKBldpbmRlchADQh4KHGNvbS50d2luZS50YW5nby5wbXIuaGFy",
- "ZHdhcmViBnByb3RvMw=="));
- descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { },
- new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tango.PMR.Hardware.MotorId), }, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.MotorConfig), global::Tango.PMR.Hardware.MotorConfig.Parser, new[]{ "Id", "MinFreq", "MaxFreq", "MinmicroStep", "MaxmicroStep", "LinearRatio", "MedianPosition", "CorrectionGain", "Ratio2DryerSpeed", "Kp", "Ki", "Kd", "ChangeSlope", "HighLengthuSec", "SpeedKeeper" }, null, null, null)
- }));
- }
- #endregion
-
- }
- #region Enums
- public enum MotorId {
- [pbr::OriginalName("Feeder")] Feeder = 0,
- [pbr::OriginalName("Dryer")] Dryer = 1,
- [pbr::OriginalName("Pooler")] Pooler = 2,
- [pbr::OriginalName("Winder")] Winder = 3,
- }
-
- #endregion
-
- #region Messages
- public sealed partial class MotorConfig : pb::IMessage<MotorConfig> {
- private static readonly pb::MessageParser<MotorConfig> _parser = new pb::MessageParser<MotorConfig>(() => new MotorConfig());
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<MotorConfig> Parser { get { return _parser; } }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::Tango.PMR.Hardware.MotorReflection.Descriptor.MessageTypes[0]; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public MotorConfig() {
- OnConstruction();
- }
-
- partial void OnConstruction();
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public MotorConfig(MotorConfig other) : this() {
- id_ = other.id_;
- minFreq_ = other.minFreq_;
- maxFreq_ = other.maxFreq_;
- minmicroStep_ = other.minmicroStep_;
- maxmicroStep_ = other.maxmicroStep_;
- linearRatio_ = other.linearRatio_;
- medianPosition_ = other.medianPosition_;
- correctionGain_ = other.correctionGain_;
- ratio2DryerSpeed_ = other.ratio2DryerSpeed_;
- kp_ = other.kp_;
- ki_ = other.ki_;
- kd_ = other.kd_;
- changeSlope_ = other.changeSlope_;
- highLengthuSec_ = other.highLengthuSec_;
- speedKeeper_ = other.speedKeeper_;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public MotorConfig Clone() {
- return new MotorConfig(this);
- }
-
- /// <summary>Field number for the "Id" field.</summary>
- public const int IdFieldNumber = 1;
- private global::Tango.PMR.Hardware.MotorId id_ = 0;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::Tango.PMR.Hardware.MotorId Id {
- get { return id_; }
- set {
- id_ = value;
- }
- }
-
- /// <summary>Field number for the "MinFreq" field.</summary>
- public const int MinFreqFieldNumber = 2;
- private uint minFreq_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MinFreq {
- get { return minFreq_; }
- set {
- minFreq_ = value;
- }
- }
-
- /// <summary>Field number for the "MaxFreq" field.</summary>
- public const int MaxFreqFieldNumber = 3;
- private uint maxFreq_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MaxFreq {
- get { return maxFreq_; }
- set {
- maxFreq_ = value;
- }
- }
-
- /// <summary>Field number for the "MinmicroStep" field.</summary>
- public const int MinmicroStepFieldNumber = 4;
- private uint minmicroStep_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MinmicroStep {
- get { return minmicroStep_; }
- set {
- minmicroStep_ = value;
- }
- }
-
- /// <summary>Field number for the "MaxmicroStep" field.</summary>
- public const int MaxmicroStepFieldNumber = 5;
- private uint maxmicroStep_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MaxmicroStep {
- get { return maxmicroStep_; }
- set {
- maxmicroStep_ = value;
- }
- }
-
- /// <summary>Field number for the "LinearRatio" field.</summary>
- public const int LinearRatioFieldNumber = 6;
- private double linearRatio_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double LinearRatio {
- get { return linearRatio_; }
- set {
- linearRatio_ = value;
- }
- }
-
- /// <summary>Field number for the "MedianPosition" field.</summary>
- public const int MedianPositionFieldNumber = 7;
- private uint medianPosition_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint MedianPosition {
- get { return medianPosition_; }
- set {
- medianPosition_ = value;
- }
- }
-
- /// <summary>Field number for the "CorrectionGain" field.</summary>
- public const int CorrectionGainFieldNumber = 8;
- private double correctionGain_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double CorrectionGain {
- get { return correctionGain_; }
- set {
- correctionGain_ = value;
- }
- }
-
- /// <summary>Field number for the "Ratio2DryerSpeed" field.</summary>
- public const int Ratio2DryerSpeedFieldNumber = 9;
- private double ratio2DryerSpeed_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Ratio2DryerSpeed {
- get { return ratio2DryerSpeed_; }
- set {
- ratio2DryerSpeed_ = value;
- }
- }
-
- /// <summary>Field number for the "Kp" field.</summary>
- public const int KpFieldNumber = 10;
- private double kp_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Kp {
- get { return kp_; }
- set {
- kp_ = value;
- }
- }
-
- /// <summary>Field number for the "Ki" field.</summary>
- public const int KiFieldNumber = 11;
- private double ki_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Ki {
- get { return ki_; }
- set {
- ki_ = value;
- }
- }
-
- /// <summary>Field number for the "Kd" field.</summary>
- public const int KdFieldNumber = 12;
- private double kd_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double Kd {
- get { return kd_; }
- set {
- kd_ = value;
- }
- }
-
- /// <summary>Field number for the "ChangeSlope" field.</summary>
- public const int ChangeSlopeFieldNumber = 13;
- private double changeSlope_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double ChangeSlope {
- get { return changeSlope_; }
- set {
- changeSlope_ = value;
- }
- }
-
- /// <summary>Field number for the "HighLengthuSec" field.</summary>
- public const int HighLengthuSecFieldNumber = 14;
- private double highLengthuSec_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double HighLengthuSec {
- get { return highLengthuSec_; }
- set {
- highLengthuSec_ = value;
- }
- }
-
- /// <summary>Field number for the "SpeedKeeper" field.</summary>
- public const int SpeedKeeperFieldNumber = 15;
- private bool speedKeeper_;
- /// <summary>
- ///one motor is setting the speed for the whole system.
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool SpeedKeeper {
- get { return speedKeeper_; }
- set {
- speedKeeper_ = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as MotorConfig);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(MotorConfig other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (Id != other.Id) return false;
- if (MinFreq != other.MinFreq) return false;
- if (MaxFreq != other.MaxFreq) return false;
- if (MinmicroStep != other.MinmicroStep) return false;
- if (MaxmicroStep != other.MaxmicroStep) return false;
- if (LinearRatio != other.LinearRatio) return false;
- if (MedianPosition != other.MedianPosition) return false;
- if (CorrectionGain != other.CorrectionGain) return false;
- if (Ratio2DryerSpeed != other.Ratio2DryerSpeed) return false;
- if (Kp != other.Kp) return false;
- if (Ki != other.Ki) return false;
- if (Kd != other.Kd) return false;
- if (ChangeSlope != other.ChangeSlope) return false;
- if (HighLengthuSec != other.HighLengthuSec) return false;
- if (SpeedKeeper != other.SpeedKeeper) return false;
- return true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (Id != 0) hash ^= Id.GetHashCode();
- if (MinFreq != 0) hash ^= MinFreq.GetHashCode();
- if (MaxFreq != 0) hash ^= MaxFreq.GetHashCode();
- if (MinmicroStep != 0) hash ^= MinmicroStep.GetHashCode();
- if (MaxmicroStep != 0) hash ^= MaxmicroStep.GetHashCode();
- if (LinearRatio != 0D) hash ^= LinearRatio.GetHashCode();
- if (MedianPosition != 0) hash ^= MedianPosition.GetHashCode();
- if (CorrectionGain != 0D) hash ^= CorrectionGain.GetHashCode();
- if (Ratio2DryerSpeed != 0D) hash ^= Ratio2DryerSpeed.GetHashCode();
- if (Kp != 0D) hash ^= Kp.GetHashCode();
- if (Ki != 0D) hash ^= Ki.GetHashCode();
- if (Kd != 0D) hash ^= Kd.GetHashCode();
- if (ChangeSlope != 0D) hash ^= ChangeSlope.GetHashCode();
- if (HighLengthuSec != 0D) hash ^= HighLengthuSec.GetHashCode();
- if (SpeedKeeper != false) hash ^= SpeedKeeper.GetHashCode();
- return hash;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- if (Id != 0) {
- output.WriteRawTag(8);
- output.WriteEnum((int) Id);
- }
- if (MinFreq != 0) {
- output.WriteRawTag(16);
- output.WriteUInt32(MinFreq);
- }
- if (MaxFreq != 0) {
- output.WriteRawTag(24);
- output.WriteUInt32(MaxFreq);
- }
- if (MinmicroStep != 0) {
- output.WriteRawTag(32);
- output.WriteUInt32(MinmicroStep);
- }
- if (MaxmicroStep != 0) {
- output.WriteRawTag(40);
- output.WriteUInt32(MaxmicroStep);
- }
- if (LinearRatio != 0D) {
- output.WriteRawTag(49);
- output.WriteDouble(LinearRatio);
- }
- if (MedianPosition != 0) {
- output.WriteRawTag(56);
- output.WriteUInt32(MedianPosition);
- }
- if (CorrectionGain != 0D) {
- output.WriteRawTag(65);
- output.WriteDouble(CorrectionGain);
- }
- if (Ratio2DryerSpeed != 0D) {
- output.WriteRawTag(73);
- output.WriteDouble(Ratio2DryerSpeed);
- }
- if (Kp != 0D) {
- output.WriteRawTag(81);
- output.WriteDouble(Kp);
- }
- if (Ki != 0D) {
- output.WriteRawTag(89);
- output.WriteDouble(Ki);
- }
- if (Kd != 0D) {
- output.WriteRawTag(97);
- output.WriteDouble(Kd);
- }
- if (ChangeSlope != 0D) {
- output.WriteRawTag(105);
- output.WriteDouble(ChangeSlope);
- }
- if (HighLengthuSec != 0D) {
- output.WriteRawTag(113);
- output.WriteDouble(HighLengthuSec);
- }
- if (SpeedKeeper != false) {
- output.WriteRawTag(120);
- output.WriteBool(SpeedKeeper);
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (Id != 0) {
- size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Id);
- }
- if (MinFreq != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinFreq);
- }
- if (MaxFreq != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxFreq);
- }
- if (MinmicroStep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinmicroStep);
- }
- if (MaxmicroStep != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxmicroStep);
- }
- if (LinearRatio != 0D) {
- size += 1 + 8;
- }
- if (MedianPosition != 0) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MedianPosition);
- }
- if (CorrectionGain != 0D) {
- size += 1 + 8;
- }
- if (Ratio2DryerSpeed != 0D) {
- size += 1 + 8;
- }
- if (Kp != 0D) {
- size += 1 + 8;
- }
- if (Ki != 0D) {
- size += 1 + 8;
- }
- if (Kd != 0D) {
- size += 1 + 8;
- }
- if (ChangeSlope != 0D) {
- size += 1 + 8;
- }
- if (HighLengthuSec != 0D) {
- size += 1 + 8;
- }
- if (SpeedKeeper != false) {
- size += 1 + 1;
- }
- return size;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(MotorConfig other) {
- if (other == null) {
- return;
- }
- if (other.Id != 0) {
- Id = other.Id;
- }
- if (other.MinFreq != 0) {
- MinFreq = other.MinFreq;
- }
- if (other.MaxFreq != 0) {
- MaxFreq = other.MaxFreq;
- }
- if (other.MinmicroStep != 0) {
- MinmicroStep = other.MinmicroStep;
- }
- if (other.MaxmicroStep != 0) {
- MaxmicroStep = other.MaxmicroStep;
- }
- if (other.LinearRatio != 0D) {
- LinearRatio = other.LinearRatio;
- }
- if (other.MedianPosition != 0) {
- MedianPosition = other.MedianPosition;
- }
- if (other.CorrectionGain != 0D) {
- CorrectionGain = other.CorrectionGain;
- }
- if (other.Ratio2DryerSpeed != 0D) {
- Ratio2DryerSpeed = other.Ratio2DryerSpeed;
- }
- if (other.Kp != 0D) {
- Kp = other.Kp;
- }
- if (other.Ki != 0D) {
- Ki = other.Ki;
- }
- if (other.Kd != 0D) {
- Kd = other.Kd;
- }
- if (other.ChangeSlope != 0D) {
- ChangeSlope = other.ChangeSlope;
- }
- if (other.HighLengthuSec != 0D) {
- HighLengthuSec = other.HighLengthuSec;
- }
- if (other.SpeedKeeper != false) {
- SpeedKeeper = other.SpeedKeeper;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- input.SkipLastField();
- break;
- case 8: {
- id_ = (global::Tango.PMR.Hardware.MotorId) input.ReadEnum();
- break;
- }
- case 16: {
- MinFreq = input.ReadUInt32();
- break;
- }
- case 24: {
- MaxFreq = input.ReadUInt32();
- break;
- }
- case 32: {
- MinmicroStep = input.ReadUInt32();
- break;
- }
- case 40: {
- MaxmicroStep = input.ReadUInt32();
- break;
- }
- case 49: {
- LinearRatio = input.ReadDouble();
- break;
- }
- case 56: {
- MedianPosition = input.ReadUInt32();
- break;
- }
- case 65: {
- CorrectionGain = input.ReadDouble();
- break;
- }
- case 73: {
- Ratio2DryerSpeed = input.ReadDouble();
- break;
- }
- case 81: {
- Kp = input.ReadDouble();
- break;
- }
- case 89: {
- Ki = input.ReadDouble();
- break;
- }
- case 97: {
- Kd = input.ReadDouble();
- break;
- }
- case 105: {
- ChangeSlope = input.ReadDouble();
- break;
- }
- case 113: {
- HighLengthuSec = input.ReadDouble();
- break;
- }
- case 120: {
- SpeedKeeper = input.ReadBool();
- break;
- }
- }
- }
- }
-
- }
-
- #endregion
-
-}
-
-#endregion Designer generated code