mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Add methods to print IR functions
This commit is contained in:
@@ -63,14 +63,18 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
LoadDriver(filePath);
|
LoadDriver(filePath);
|
||||||
|
|
||||||
Debug.Console(2, this, "Available IR Commands in IR File {0}",IrPortUid);
|
PrintAvailableCommands();
|
||||||
foreach (var cmd in IrPort.AvailableIRCmds())
|
|
||||||
{
|
|
||||||
Debug.Console(2, this, "{0}", cmd);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PrintAvailableCommands()
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Available IR Commands in IR File {0}", IrPortUid);
|
||||||
|
foreach (var cmd in IrPort.AvailableIRCmds())
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "{0}", cmd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharp.Reflection;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@@ -34,8 +35,17 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void PrintExpectedIrCommands()
|
||||||
|
{
|
||||||
|
var cmds = typeof (AppleTvIrCommands).GetCType().GetFields(BindingFlags.Public | BindingFlags.Static);
|
||||||
|
|
||||||
#region IDPad Members
|
foreach (var value in cmds.Select(cmd => cmd.GetValue(null)).OfType<string>())
|
||||||
|
{
|
||||||
|
Debug.Console(2, this, "Expected IR Function Name: {0}", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#region IDPad Members
|
||||||
|
|
||||||
public void Up(bool pressRelease)
|
public void Up(bool pressRelease)
|
||||||
{
|
{
|
||||||
@@ -192,14 +202,15 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
|
|
||||||
public static class AppleTvIrCommands
|
public static class AppleTvIrCommands
|
||||||
{
|
{
|
||||||
public const string Up = "UP_ARROW";
|
|
||||||
public const string Down = "DOWN_ARROW";
|
public static string Up = "+";
|
||||||
public const string Left = "LEFT_ARROW";
|
public static string Down = "-";
|
||||||
public const string Right = "RIGHT_ARROW";
|
public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS;
|
||||||
public const string Enter = "SELECT";
|
public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS;
|
||||||
public const string PlayPause = "PLAY_PAUSE";
|
public static string Enter = IROutputStandardCommands.IROut_ENTER;
|
||||||
public const string Rewind = "REWIND";
|
public static string PlayPause = "PLAY/PAUSE";
|
||||||
public const string Menu = "MENU";
|
public static string Rewind = "REWIND";
|
||||||
public const string FastForward = "FASTFORWARD";
|
public static string Menu = "Menu";
|
||||||
|
public static string FastForward = "FASTFORWARD";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user