mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
fix: resolves hdPsXxx audio controllers scaleWithLimits exception
This commit is contained in:
@@ -61,6 +61,9 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
var level = value;
|
var level = value;
|
||||||
|
Debug.Console(1, this, "VolumeLevel: value-'{0}', level-'{1}'", value, level);
|
||||||
|
|
||||||
|
// ScaleWithLimits(inputValue, InputUpperBound, InputLowerBound, OutputUpperBound, OutputLowerBound)
|
||||||
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
||||||
|
|
||||||
Debug.Console(1, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
Debug.Console(1, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
||||||
@@ -73,8 +76,8 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
|
|
||||||
public void SetVolume(ushort level)
|
public void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
var scaled = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax,
|
// ScaleWithLimits(inputValue, InputUpperBound, InputLowerBound, OutputUpperBound, OutputLowerBound)
|
||||||
DeviceLevelMin);
|
var scaled = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax, DeviceLevelMin);
|
||||||
|
|
||||||
Debug.Console(1, this, "SetVolume: level-'{0}', scaled-'{1}'", level, scaled);
|
Debug.Console(1, this, "SetVolume: level-'{0}', scaled-'{1}'", level, scaled);
|
||||||
|
|
||||||
|
|||||||
@@ -86,11 +86,13 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
foreach (var item in _chassis.HdmiDmLiteOutputs)
|
foreach (var item in _chassis.HdmiDmLiteOutputs)
|
||||||
{
|
{
|
||||||
var audioDevice = new HdPsXxxOutputAudioController(Key, item.Number, _chassis);
|
var audioDevice = new HdPsXxxOutputAudioController(Key, item.Number, _chassis);
|
||||||
|
Debug.Console(0, this, "HdPsXxxController: created HdPsXxxOutputAudioController Key-{0}', Output-'{1}'", audioDevice.Key, item.Number);
|
||||||
DeviceManager.AddDevice(audioDevice);
|
DeviceManager.AddDevice(audioDevice);
|
||||||
}
|
}
|
||||||
foreach (var item in _chassis.AnalogAuxiliaryMixer)
|
foreach (var item in _chassis.AnalogAuxiliaryMixer)
|
||||||
{
|
{
|
||||||
var audioDevice = new HdPsXxxAnalogAuxMixerController(Key, item.MixerNumber, _chassis);
|
var audioDevice = new HdPsXxxAnalogAuxMixerController(Key, item.MixerNumber, _chassis);
|
||||||
|
Debug.Console(0, this, "HdPsXxxController: created HdPsXxAnalogAuxMixerCOntorller Key-{0}', Output-'{1}'", audioDevice.Key, item.MixerNumber);
|
||||||
DeviceManager.AddDevice(audioDevice);
|
DeviceManager.AddDevice(audioDevice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,10 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
var level = value;
|
var level = value;
|
||||||
//_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
Debug.Console(1, this, "VolumeLevel: value-'{0}', level-'{1}'", value, level);
|
||||||
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax, DeviceLevelMin);
|
|
||||||
|
// ScaleWithLimits(inputValue, InputUpperBound, InputLowerBound, OutputUpperBound, OutputLowerBound)
|
||||||
|
_volumeLevel = CrestronEnvironment.ScaleWithLimits(level, DeviceLevelMax, DeviceLevelMin, CrestronLevelMax, CrestronLevelMin);
|
||||||
|
|
||||||
Debug.Console(2, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
Debug.Console(2, this, "VolumeFeedback: level-'{0}', scaled-'{1}'", level, _volumeLevel);
|
||||||
|
|
||||||
@@ -58,8 +60,10 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
|
|
||||||
public void SetVolume(ushort level)
|
public void SetVolume(ushort level)
|
||||||
{
|
{
|
||||||
var scaled = CrestronEnvironment.ScaleWithLimits(level, CrestronLevelMax, CrestronLevelMin, DeviceLevelMax,
|
// ScaleWithLimits(inputValue, InputUpperBound, InputLowerBound, OutputUpperBound, OutputLowerBound)
|
||||||
DeviceLevelMin);
|
var scaled = CrestronEnvironment.ScaleWithLimits(level,
|
||||||
|
CrestronLevelMax, CrestronLevelMin,
|
||||||
|
DeviceLevelMax, DeviceLevelMin);
|
||||||
|
|
||||||
Debug.Console(1, this, "SetVolume: level-'{0}', scaled-'{1}'", level, scaled);
|
Debug.Console(1, this, "SetVolume: level-'{0}', scaled-'{1}'", level, scaled);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user