mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Updates to source switching digitals and added processor reboot attribute to Fusion
This commit is contained in:
@@ -29,8 +29,8 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
|
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Reloads configuration file",
|
||||||
ConsoleAccessLevelEnum.AccessOperator);
|
// ConsoleAccessLevelEnum.AccessOperator);
|
||||||
//CrestronConsole.AddNewConsoleCommand(s => TearDown(), "ungo", "Reloads configuration file",
|
//CrestronConsole.AddNewConsoleCommand(s => TearDown(), "ungo", "Reloads configuration file",
|
||||||
// ConsoleAccessLevelEnum.AccessOperator);
|
// ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
@@ -40,7 +40,7 @@ namespace PepperDash.Essentials
|
|||||||
},
|
},
|
||||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
//GoWithLoad();
|
GoWithLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -292,6 +292,8 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
GetProcessorEthernetValues();
|
GetProcessorEthernetValues();
|
||||||
|
|
||||||
|
GetSystemInfo();
|
||||||
|
|
||||||
GetProcessorInfo();
|
GetProcessorInfo();
|
||||||
|
|
||||||
CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
|
CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
|
||||||
@@ -307,9 +309,14 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
void GetSystemInfo()
|
void GetSystemInfo()
|
||||||
{
|
{
|
||||||
SystemName.InputSig.StringValue = Room.Name;
|
//SystemName.InputSig.StringValue = Room.Name;
|
||||||
Model.InputSig.StringValue = InitialParametersClass.ControllerPromptName;
|
//Model.InputSig.StringValue = InitialParametersClass.ControllerPromptName;
|
||||||
//SerialNumber.InputSig.StringValue = InitialParametersClass.
|
//SerialNumber.InputSig.StringValue = InitialParametersClass.
|
||||||
|
|
||||||
|
string response = string.Empty;
|
||||||
|
|
||||||
|
var systemReboot = FusionRoom.CreateOffsetBoolSig(74, "Processor - Reboot", eSigIoMask.OutputSigOnly);
|
||||||
|
systemReboot.OutputSig.SetSigFalseAction(() => CrestronConsole.SendControlSystemCommand("reboot", ref response));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetProcessorEthernetValues()
|
void GetProcessorEthernetValues()
|
||||||
@@ -829,7 +836,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
uint i = 1;
|
uint i = 1;
|
||||||
foreach (var kvp in setTopBoxes)
|
foreach (var kvp in setTopBoxes)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Source - TV " + i, 115 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source TV " + i, 188 + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > 5) // We only have five spots
|
||||||
break;
|
break;
|
||||||
@@ -839,7 +846,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in discPlayers)
|
foreach (var kvp in discPlayers)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Source - DVD " + i, 120 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source DVD " + i, 181 + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 5) // We only have five spots
|
if (i > 5) // We only have five spots
|
||||||
break;
|
break;
|
||||||
@@ -849,7 +856,7 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
i = 1;
|
i = 1;
|
||||||
foreach (var kvp in laptops)
|
foreach (var kvp in laptops)
|
||||||
{
|
{
|
||||||
TryAddRouteActionSigs("Source - Laptop " + i, 100 + i, kvp.Key, kvp.Value.SourceDevice);
|
TryAddRouteActionSigs("Display 1 - Source Laptop " + i, 166 + i, kvp.Key, kvp.Value.SourceDevice);
|
||||||
i++;
|
i++;
|
||||||
if (i > 10) // We only have ten spots???
|
if (i > 10) // We only have ten spots???
|
||||||
break;
|
break;
|
||||||
@@ -1085,31 +1092,38 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
if(display == Room.DefaultDisplay)
|
if(display == Room.DefaultDisplay)
|
||||||
{
|
{
|
||||||
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayIndex + "Power On", eSigIoMask.InputOutputSig);
|
// Display volume
|
||||||
|
var defaultDisplayVolume = FusionRoom.CreateOffsetUshortSig(50, "Volume - Fader01", eSigIoMask.InputOutputSig);
|
||||||
|
defaultDisplayVolume.OutputSig.UserObject = new Action<ushort>(b => (display as IBasicVolumeWithFeedback).SetVolume(b));
|
||||||
|
(display as IBasicVolumeWithFeedback).VolumeLevelFeedback.LinkInputSig(defaultDisplayVolume.InputSig);
|
||||||
|
|
||||||
|
// Power on
|
||||||
|
var defaultDisplayPowerOn = FusionRoom.CreateOffsetBoolSig((uint)joinOffset, displayName + "Power On", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOn(); });
|
||||||
display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
|
|
||||||
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayIndex + "Power Off", eSigIoMask.InputOutputSig);
|
// Power Off
|
||||||
|
var defaultDisplayPowerOff = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 1, displayName + "Power Off", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
defaultDisplayPowerOn.OutputSig.UserObject = new Action<bool>(b => { if (!b) display.PowerOff(); }); ;
|
||||||
display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
display.PowerIsOnFeedback.LinkInputSig(defaultDisplayPowerOn.InputSig);
|
||||||
|
|
||||||
|
// Current Source
|
||||||
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayIndex + "Source None", eSigIoMask.InputOutputSig);
|
var defaultDisplaySourceNone = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + 8, displayName + "Source None", eSigIoMask.InputOutputSig);
|
||||||
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) Room.RunRouteAction("roomOff"); }); ;
|
defaultDisplaySourceNone.OutputSig.UserObject = new Action<bool>(b => { if (!b) Room.RunRouteAction("roomOff"); }); ;
|
||||||
|
|
||||||
var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey);
|
//var dict = ConfigReader.ConfigObject.GetSourceListForKey(Room.SourceListKey);
|
||||||
|
|
||||||
foreach (var item in dict)
|
//foreach (var item in dict)
|
||||||
{
|
//{
|
||||||
if(item.Key != "roomOff")
|
// if(item.Key != "roomOff")
|
||||||
{
|
// {
|
||||||
var defaultDisplaySource = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + (uint)item.Value.Order + 9 , string.Format("{0}Source {1}", displayIndex, item.Value.Order), eSigIoMask.InputOutputSig);
|
// var defaultDisplaySource = FusionRoom.CreateOffsetBoolSig((uint)joinOffset + (uint)item.Value.Order + 9 , string.Format("{0}Source {1}", displayIndex, item.Value.Order), eSigIoMask.InputOutputSig);
|
||||||
defaultDisplaySource.OutputSig.UserObject = new Action<bool>(b => { if (!b) Room.RunRouteAction(item.Key); });
|
// defaultDisplaySource.OutputSig.UserObject = new Action<bool>(b => { if (!b) Room.RunRouteAction(item.Key); });
|
||||||
|
|
||||||
//defaultDisplaySource.InputSig = Source[item.Value.Order].InputSig;
|
// //defaultDisplaySource.InputSig = Source[item.Value.Order].InputSig;
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1169,6 +1183,12 @@ namespace PepperDash.Essentials.Fusion
|
|||||||
|
|
||||||
occSensorAsset.RoomOccupied.AddSigToRVIFile = true;
|
occSensorAsset.RoomOccupied.AddSigToRVIFile = true;
|
||||||
|
|
||||||
|
var occSensorShutdownMinutes = FusionRoom.CreateOffsetUshortSig(70, "Occ Shutdown - Minutes", eSigIoMask.InputOutputSig);
|
||||||
|
|
||||||
|
// Tie to method on occupancy object
|
||||||
|
//occSensorShutdownMinutes.OutputSig.UserObject(new Action(ushort)(b => Room.OccupancyObj.SetShutdownMinutes(b));
|
||||||
|
|
||||||
|
|
||||||
// use Room.OccObject.RoomOccupiedFeedback.LinkInputSig(occSensorAsset.InputSig);
|
// use Room.OccObject.RoomOccupiedFeedback.LinkInputSig(occSensorAsset.InputSig);
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user