naming convention
This commit is contained in:
parent
45a10abb61
commit
75e0c85b61
@ -21,7 +21,7 @@ public class OSCCollar
|
|||||||
private static readonly TimeSpan ConsoleUpdateInterval = TimeSpan.FromMilliseconds(100);
|
private static readonly TimeSpan ConsoleUpdateInterval = TimeSpan.FromMilliseconds(100);
|
||||||
private static readonly TimeSpan UpdateInterval = TimeSpan.FromMilliseconds(1);
|
private static readonly TimeSpan UpdateInterval = TimeSpan.FromMilliseconds(1);
|
||||||
private static readonly TimeSpan MessageMinInterval = TimeSpan.FromMilliseconds(400);
|
private static readonly TimeSpan MessageMinInterval = TimeSpan.FromMilliseconds(400);
|
||||||
private double radius;
|
private readonly double _radius;
|
||||||
private GPS GPS1 { get; init; }
|
private GPS GPS1 { get; init; }
|
||||||
private GPS GPS2 { get; init; }
|
private GPS GPS2 { get; init; }
|
||||||
private GPS GPS3 { get; init; }
|
private GPS GPS3 { get; init; }
|
||||||
@ -36,7 +36,7 @@ public class OSCCollar
|
|||||||
|
|
||||||
private OSCCollar(string ip = "127.0.0.1", int portReceive = 9001, int portSend = 9000, double radius = 100, double calibrationX = 0, double calibrationY = 0, bool skipSetup = true)
|
private OSCCollar(string ip = "127.0.0.1", int portReceive = 9001, int portSend = 9000, double radius = 100, double calibrationX = 0, double calibrationY = 0, bool skipSetup = true)
|
||||||
{
|
{
|
||||||
this.radius = radius;
|
this._radius = radius;
|
||||||
this.GPS1 = new(0, -radius);
|
this.GPS1 = new(0, -radius);
|
||||||
this.GPS2 = new(-(radius * 0.866), radius / 2);
|
this.GPS2 = new(-(radius * 0.866), radius / 2);
|
||||||
this.GPS3 = new(radius * 0.866, radius / 2);
|
this.GPS3 = new(radius * 0.866, radius / 2);
|
||||||
@ -125,17 +125,17 @@ public class OSCCollar
|
|||||||
|
|
||||||
private void GPS1Handle(OscMessageValues messageValues)
|
private void GPS1Handle(OscMessageValues messageValues)
|
||||||
{
|
{
|
||||||
this.GPS1.Distance = messageValues.ReadFloatElement(0) * radius;
|
this.GPS1.Distance = messageValues.ReadFloatElement(0) * _radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GPS2Handle(OscMessageValues messageValues)
|
private void GPS2Handle(OscMessageValues messageValues)
|
||||||
{
|
{
|
||||||
this.GPS2.Distance = messageValues.ReadFloatElement(0) * radius;
|
this.GPS2.Distance = messageValues.ReadFloatElement(0) * _radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GPS3Handle(OscMessageValues messageValues)
|
private void GPS3Handle(OscMessageValues messageValues)
|
||||||
{
|
{
|
||||||
this.GPS3.Distance = messageValues.ReadFloatElement(0) * radius;
|
this.GPS3.Distance = messageValues.ReadFloatElement(0) * _radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CollarStretchHandle(OscMessageValues messageValues)
|
private void CollarStretchHandle(OscMessageValues messageValues)
|
||||||
|
Loading…
Reference in New Issue
Block a user