aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.PMR/Hardware
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-09 10:48:26 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-09 10:48:26 +0300
commit915ee5e76204c895c71ae45447b47f24dfde44a8 (patch)
treee74f7f509dead34ed31a4729d6d330f93a84240f /Software/Visual_Studio/Tango.PMR/Hardware
parentd1874d5765f96e8f1c2688ff57ccfc1e826d4023 (diff)
downloadTango-915ee5e76204c895c71ae45447b47f24dfde44a8.tar.gz
Tango-915ee5e76204c895c71ae45447b47f24dfde44a8.zip
Added new fields to HardwareMotor on DB, Observables & PMR.
Diffstat (limited to 'Software/Visual_Studio/Tango.PMR/Hardware')
-rw-r--r--Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs121
1 files changed, 117 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
index 6f6e2abdd..0cb92f34e 100644
--- a/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
+++ b/Software/Visual_Studio/Tango.PMR/Hardware/HardwareMotor.cs
@@ -23,7 +23,7 @@ namespace Tango.PMR.Hardware {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChNIYXJkd2FyZU1vdG9yLnByb3RvEhJUYW5nby5QTVIuSGFyZHdhcmUaF0hh",
- "cmR3YXJlTW90b3JUeXBlLnByb3RvIowECg1IYXJkd2FyZU1vdG9yEkAKEUhh",
+ "cmR3YXJlTW90b3JUeXBlLnByb3RvIs8ECg1IYXJkd2FyZU1vdG9yEkAKEUhh",
"cmR3YXJlTW90b3JUeXBlGAEgASgOMiUuVGFuZ28uUE1SLkhhcmR3YXJlLkhh",
"cmR3YXJlTW90b3JUeXBlEhQKDE1pbkZyZXF1ZW5jeRgCIAEoBRIUCgxNYXhG",
"cmVxdWVuY3kYAyABKAUSFAoMU2V0TWljcm9TdGVwGAQgASgFEhEKCU1pY3Jv",
@@ -35,12 +35,13 @@ namespace Tango.PMR.Hardware {
"YxgPIAEoBRIPCgdLdmFsRGVjGBAgASgFEhwKFE92ZXJDdXJyZW50VGhyZXNo",
"b2xkGBEgASgFEhYKDlN0YWxsVGhyZXNob2xkGBIgASgFEiEKGVRoZXJtYWxD",
"b21wZW5zYXRpb25GYWN0b3IYEyABKAUSHAoUTG93U3BlZWRPcHRpbWl6YXRp",
- "b24YFCABKAhCHgocY29tLnR3aW5lLnRhbmdvLnBtci5oYXJkd2FyZWIGcHJv",
- "dG8z"));
+ "b24YFCABKAgSDQoFU3RTbHAYFSABKAUSDgoGSW50U3BkGBYgASgFEhAKCEZu",
+ "U2xwQWNjGBcgASgFEhAKCEZuU2xwRGVjGBggASgFQh4KHGNvbS50d2luZS50",
+ "YW5nby5wbXIuaGFyZHdhcmViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Tango.PMR.Hardware.HardwareMotorTypeReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize", "KvalHold", "KvalRun", "KvalAcc", "KvalDec", "OverCurrentThreshold", "StallThreshold", "ThermalCompensationFactor", "LowSpeedOptimization" }, null, null, null)
+ new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Hardware.HardwareMotor), global::Tango.PMR.Hardware.HardwareMotor.Parser, new[]{ "HardwareMotorType", "MinFrequency", "MaxFrequency", "SetMicroStep", "MicroStep", "MaxChangeSlope", "HighLengthMicroSecond", "SpeedMaster", "PulsePerRound", "PulleyRadius", "ConfigWord", "DirectionThreadWize", "KvalHold", "KvalRun", "KvalAcc", "KvalDec", "OverCurrentThreshold", "StallThreshold", "ThermalCompensationFactor", "LowSpeedOptimization", "StSlp", "IntSpd", "FnSlpAcc", "FnSlpDec" }, null, null, null)
}));
}
#endregion
@@ -91,6 +92,10 @@ namespace Tango.PMR.Hardware {
stallThreshold_ = other.stallThreshold_;
thermalCompensationFactor_ = other.thermalCompensationFactor_;
lowSpeedOptimization_ = other.lowSpeedOptimization_;
+ stSlp_ = other.stSlp_;
+ intSpd_ = other.intSpd_;
+ fnSlpAcc_ = other.fnSlpAcc_;
+ fnSlpDec_ = other.fnSlpDec_;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -318,6 +323,50 @@ namespace Tango.PMR.Hardware {
}
}
+ /// <summary>Field number for the "StSlp" field.</summary>
+ public const int StSlpFieldNumber = 21;
+ private int stSlp_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int StSlp {
+ get { return stSlp_; }
+ set {
+ stSlp_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "IntSpd" field.</summary>
+ public const int IntSpdFieldNumber = 22;
+ private int intSpd_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int IntSpd {
+ get { return intSpd_; }
+ set {
+ intSpd_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FnSlpAcc" field.</summary>
+ public const int FnSlpAccFieldNumber = 23;
+ private int fnSlpAcc_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FnSlpAcc {
+ get { return fnSlpAcc_; }
+ set {
+ fnSlpAcc_ = value;
+ }
+ }
+
+ /// <summary>Field number for the "FnSlpDec" field.</summary>
+ public const int FnSlpDecFieldNumber = 24;
+ private int fnSlpDec_;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int FnSlpDec {
+ get { return fnSlpDec_; }
+ set {
+ fnSlpDec_ = value;
+ }
+ }
+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as HardwareMotor);
@@ -351,6 +400,10 @@ namespace Tango.PMR.Hardware {
if (StallThreshold != other.StallThreshold) return false;
if (ThermalCompensationFactor != other.ThermalCompensationFactor) return false;
if (LowSpeedOptimization != other.LowSpeedOptimization) return false;
+ if (StSlp != other.StSlp) return false;
+ if (IntSpd != other.IntSpd) return false;
+ if (FnSlpAcc != other.FnSlpAcc) return false;
+ if (FnSlpDec != other.FnSlpDec) return false;
return true;
}
@@ -377,6 +430,10 @@ namespace Tango.PMR.Hardware {
if (StallThreshold != 0) hash ^= StallThreshold.GetHashCode();
if (ThermalCompensationFactor != 0) hash ^= ThermalCompensationFactor.GetHashCode();
if (LowSpeedOptimization != false) hash ^= LowSpeedOptimization.GetHashCode();
+ if (StSlp != 0) hash ^= StSlp.GetHashCode();
+ if (IntSpd != 0) hash ^= IntSpd.GetHashCode();
+ if (FnSlpAcc != 0) hash ^= FnSlpAcc.GetHashCode();
+ if (FnSlpDec != 0) hash ^= FnSlpDec.GetHashCode();
return hash;
}
@@ -467,6 +524,22 @@ namespace Tango.PMR.Hardware {
output.WriteRawTag(160, 1);
output.WriteBool(LowSpeedOptimization);
}
+ if (StSlp != 0) {
+ output.WriteRawTag(168, 1);
+ output.WriteInt32(StSlp);
+ }
+ if (IntSpd != 0) {
+ output.WriteRawTag(176, 1);
+ output.WriteInt32(IntSpd);
+ }
+ if (FnSlpAcc != 0) {
+ output.WriteRawTag(184, 1);
+ output.WriteInt32(FnSlpAcc);
+ }
+ if (FnSlpDec != 0) {
+ output.WriteRawTag(192, 1);
+ output.WriteInt32(FnSlpDec);
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -532,6 +605,18 @@ namespace Tango.PMR.Hardware {
if (LowSpeedOptimization != false) {
size += 2 + 1;
}
+ if (StSlp != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(StSlp);
+ }
+ if (IntSpd != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(IntSpd);
+ }
+ if (FnSlpAcc != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FnSlpAcc);
+ }
+ if (FnSlpDec != 0) {
+ size += 2 + pb::CodedOutputStream.ComputeInt32Size(FnSlpDec);
+ }
return size;
}
@@ -600,6 +685,18 @@ namespace Tango.PMR.Hardware {
if (other.LowSpeedOptimization != false) {
LowSpeedOptimization = other.LowSpeedOptimization;
}
+ if (other.StSlp != 0) {
+ StSlp = other.StSlp;
+ }
+ if (other.IntSpd != 0) {
+ IntSpd = other.IntSpd;
+ }
+ if (other.FnSlpAcc != 0) {
+ FnSlpAcc = other.FnSlpAcc;
+ }
+ if (other.FnSlpDec != 0) {
+ FnSlpDec = other.FnSlpDec;
+ }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
@@ -690,6 +787,22 @@ namespace Tango.PMR.Hardware {
LowSpeedOptimization = input.ReadBool();
break;
}
+ case 168: {
+ StSlp = input.ReadInt32();
+ break;
+ }
+ case 176: {
+ IntSpd = input.ReadInt32();
+ break;
+ }
+ case 184: {
+ FnSlpAcc = input.ReadInt32();
+ break;
+ }
+ case 192: {
+ FnSlpDec = input.ReadInt32();
+ break;
+ }
}
}
}