Skip to content

Commit

Permalink
Minor refactor to cshock intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Nov 7, 2024
1 parent 3edea9b commit 34a2b12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions ShockOsc/Services/ShockOsc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,8 @@ private async Task ReceiveLogic()
return;
}

var scaledIntensity = intensity * 100f;
if(scaledIntensity > 127) break;

programGroup.ConcurrentIntensity = Convert.ToByte(intensity * 100f);
var scaledIntensity = MathUtils.Saturate(intensity) * 100f;
programGroup.ConcurrentIntensity = Convert.ToByte(scaledIntensity);

var ctype = action switch
{
Expand Down
4 changes: 2 additions & 2 deletions ShockOsc/ShockOsc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
<PackageReference Include="MudBlazor" Version="7.13.0" />
<PackageReference Include="MudBlazor" Version="7.15.0" />
<PackageReference Include="EmbedIO" Version="3.5.2"/>
<PackageReference Include="LucHeart.CoreOSC" Version="1.4.0" />
<PackageReference Include="MeaMod.DNS" Version="1.0.71" />
<PackageReference Include="OpenShock.SDK.CSharp" Version="0.0.28" />
<PackageReference Include="OpenShock.SDK.CSharp.Hub" Version="0.0.28" />
<PackageReference Include="OpenShock.SDK.CSharp.Live" Version="0.0.28" />
<PackageReference Include="OscQueryLibrary" Version="1.1.1" />
<PackageReference Include="Semver" Version="2.3.0"/>
<PackageReference Include="Semver" Version="3.0.0" />
<PackageReference Include="Serilog" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0"/>
Expand Down

0 comments on commit 34a2b12

Please sign in to comment.