Skip to content

Commit 7f3ab6a

Browse files
committed
added configurable port
1 parent e7ae7da commit 7f3ab6a

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

NewStarGPTelemetryMod.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFramework>net46</TargetFramework>
55
<AssemblyName>NewStarGPTelemetryMod</AssemblyName>
66
<Product>Newstar Telemetry Plugin</Product>
7-
<Version>1.0.0</Version>
7+
<Version>1.0.1</Version>
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
<LangVersion>latest</LangVersion>
1010
<RestoreAdditionalProjectSources>

NewStarTelemetryPlugin.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class NewStarTelemetryPlugin : BaseUnityPlugin
2929

3030
RacingContextManager _racingContextManager;
3131

32-
private ConfigEntry<float> configAccelSmoothing;
32+
private ConfigEntry<int> Port;
3333

3434
CarControl _carControl
3535
{
@@ -69,16 +69,13 @@ private void Awake()
6969

7070
// Plugin startup logic
7171
Logger = base.Logger;
72-
73-
74-
75-
configAccelSmoothing = Config.Bind("Telemetry", "AccelSmoothing", 0.1f, "Smoothing factor for AccelZ");
7672

7773

74+
Port = Config.Bind("Telemetry", "UDP Port", 12345, "Port to Send Telemetry");
7875

7976
_udp = new UdpTelemetry<NewStarTelemetryData>(new UdpTelemetryConfig
8077
{
81-
SendAddress = new IPEndPoint(IPAddress.Loopback, 12345)
78+
SendAddress = new IPEndPoint(IPAddress.Loopback, Port.Value)
8279
});
8380

8481
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");

0 commit comments

Comments
 (0)