Skip to content

Commit

Permalink
feat: add simpl+ modules and updated demo program with mixer in/out f…
Browse files Browse the repository at this point in the history
…ader controls

closes #38
  • Loading branch information
MatKlucznyk committed Feb 7, 2024
1 parent bc2ae09 commit 96ac55a
Show file tree
Hide file tree
Showing 18 changed files with 1,130 additions and 180 deletions.
12 changes: 6 additions & 6 deletions QscQsys/QscQsys/NamedComponents/QsysMatrixMixerInputFader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public sealed class QsysMatrixMixerInputFader : AbstractQsysComponent
{
public delegate void MuteChange(SimplSharpString cName, ushort value);
public delegate void VolumeChange(SimplSharpString cName, ushort value);
public MuteChange newCrossPointMuteChange { get; set; }
public VolumeChange newCrossPointGainChange { get; set; }
public MuteChange newMuteChange { get; set; }
public VolumeChange newVolumeChange { get; set; }

private ushort _input;
private bool _initialized;
Expand Down Expand Up @@ -81,13 +81,13 @@ protected override void HandleComponentUpdated(NamedComponent component)
GainControl = component.LazyLoadComponentControl(GainControlName);
}

public void SetCrossPointMute(ushort value)
public void SetMute(ushort value)
{
if (MuteControl != null)
MuteControl.SendChangeBoolValue(value.BoolFromSplus());
}

public void SetCrossPointGain(ushort value)
public void SetGain(ushort value)
{
if (GainControl != null)
GainControl.SendChangePosition(SimplUtils.ScaleToDouble(value));
Expand All @@ -113,7 +113,7 @@ private void UnsubscribeMuteControl(NamedComponentControl muteControl)

private void MuteControlOnStateChanged(object sender, QsysInternalEventsArgs args)
{
var callback = newCrossPointMuteChange;
var callback = newMuteChange;
if (callback != null)
callback(MuteControlName, args.BoolValue.BoolToSplus());
}
Expand All @@ -140,7 +140,7 @@ private void UnsubscribeGainControl(NamedComponentControl gainControl)

private void GainControlOnStateChanged(object sender, QsysInternalEventsArgs args)
{
var callback = newCrossPointGainChange;
var callback = newVolumeChange;
if (callback != null)
callback(GainControlName, SimplUtils.ScaleToUshort(args.Position));
}
Expand Down
12 changes: 6 additions & 6 deletions QscQsys/QscQsys/NamedComponents/QsysMatrixMixerOutputFader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public sealed class QsysMatrixMixerOutputFader : AbstractQsysComponent
{
public delegate void MuteChange(SimplSharpString cName, ushort value);
public delegate void VolumeChange(SimplSharpString cName, ushort value);
public MuteChange newCrossPointMuteChange { get; set; }
public VolumeChange newCrossPointGainChange { get; set; }
public MuteChange newMuteChange { get; set; }
public VolumeChange newVolumeChange { get; set; }

private ushort _output;
private bool _initialized;
Expand Down Expand Up @@ -81,13 +81,13 @@ protected override void HandleComponentUpdated(NamedComponent component)
GainControl = component.LazyLoadComponentControl(GainControlName);
}

public void SetCrossPointMute(ushort value)
public void SetMute(ushort value)
{
if (MuteControl != null)
MuteControl.SendChangeBoolValue(value.BoolFromSplus());
}

public void SetCrossPointGain(ushort value)
public void SetGain(ushort value)
{
if (GainControl != null)
GainControl.SendChangePosition(SimplUtils.ScaleToDouble(value));
Expand All @@ -113,7 +113,7 @@ private void UnsubscribeMuteControl(NamedComponentControl muteControl)

private void MuteControlOnStateChanged(object sender, QsysInternalEventsArgs args)
{
var callback = newCrossPointMuteChange;
var callback = newMuteChange;
if (callback != null)
callback(MuteControlName, args.BoolValue.BoolToSplus());
}
Expand All @@ -140,7 +140,7 @@ private void UnsubscribeGainControl(NamedComponentControl gainControl)

private void GainControlOnStateChanged(object sender, QsysInternalEventsArgs args)
{
var callback = newCrossPointGainChange;
var callback = newVolumeChange;
if (callback != null)
callback(GainControlName, SimplUtils.ScaleToUshort(args.Position));
}
Expand Down
Binary file modified QscQsys/QscQsys/bin/Debug/QscQsys.clz
Binary file not shown.
4 changes: 2 additions & 2 deletions QscQsys/QscQsys/bin/Debug/QscQsys.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<ArchiveName />
</RequiredInfo>
<OptionalInfo>
<CompiledOn>2024-02-07 1:28:46 PM</CompiledOn>
<CompilerRev>1.0.0.24262</CompilerRev>
<CompiledOn>2024-02-07 1:35:31 PM</CompiledOn>
<CompilerRev>1.0.0.24464</CompilerRev>
</OptionalInfo>
<Plugin>
<Version>Crestron.SIMPLSharp, Version=2.0.58.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>
Expand Down
Binary file modified QscQsys/QscQsys/bin/Debug/QscQsys.dll
Binary file not shown.
Binary file modified QscQsys/QscQsys/bin/Debug/QscQsys.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion QscQsys/QscQsys/bin/Debug/manifest.info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MainAssembly=QscQsys.dll:dd926894c750eaaa540ab8ff32354974
MainAssembly=QscQsys.dll:ff95c494a89d43dc13c7132badcf651d
MainAssemblyMinFirmwareVersion=1.007.0017
MainAssemblyResource=QscQsys.xml:59588033c4d98eef04c508e59e1e843d
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
Expand Down
Binary file modified QscQsys/QscQsys/bin/Debug/manifest.ser
Binary file not shown.
Binary file modified QscQsys/QscQsys/obj/Debug/QscQsys.dll
Binary file not shown.
Binary file modified QscQsys/QscQsys/obj/Debug/QscQsys.pdb
Binary file not shown.
Loading

0 comments on commit 96ac55a

Please sign in to comment.