Skip to content

Commit

Permalink
Bump v0.0.35
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-dmxc committed Mar 20, 2023
1 parent dcc8ce7 commit 9979e57
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 10 additions & 3 deletions NanoleafAPI/API/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,21 +248,28 @@ public double RefreshRate

#pragma warning disable CS8618
[JsonConstructor]
public Controller(string ip, string port, string? auth_token = null)
public Controller(string ip, string port, string? auth_token = null, bool initialize = true)
{
_logger = Tools.LoggerFactory.CreateLogger<Controller>();
IP = ip;
Port = port;
Auth_token = auth_token;
_ = startServices();
if (initialize)
_ = startServices();
}
#pragma warning restore CS8618

~Controller()
{
Dispose();
}

public async Task Initialize()
{
if (this.IsInitialized)
return;

await this.startServices();
}
private async Task startServices()
{
if (!Tools.IsTokenValid(Auth_token))
Expand Down
4 changes: 2 additions & 2 deletions NanoleafAPI/API/JSON-Objects/Events/GestureEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace NanoleafAPI
public readonly struct GestureEvent
{
[JsonPropertyName("gesture")]
public readonly EGesture Gesture { get; }
public readonly EGesture Gesture { get; } = EGesture.UNKNOWN;
[JsonPropertyName("panelId")]
public readonly int PanelID { get; }
public readonly int PanelID { get; } = -2;


[JsonConstructor]
Expand Down
2 changes: 1 addition & 1 deletion NanoleafAPI/NanoleafAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>0.0.34</Version>
<Version>0.0.35</Version>
<RepositoryUrl>https://github.com/patrick-dmxc/NanoleafAPI</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<PackageTags>Nanoleaf Light-Panels Canvas Shapes Essentials Elemants Lines API SmartHome</PackageTags>
Expand Down

0 comments on commit 9979e57

Please sign in to comment.