mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Add methods to print IR functions
This commit is contained in:
parent
277886b092
commit
6fe13b6a92
2 changed files with 30 additions and 15 deletions
|
|
@ -63,16 +63,20 @@ namespace PepperDash.Essentials.Core
|
|||
|
||||
LoadDriver(filePath);
|
||||
|
||||
Debug.Console(2, this, "Available IR Commands in IR File {0}",IrPortUid);
|
||||
PrintAvailableCommands();
|
||||
});
|
||||
}
|
||||
|
||||
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>
|
||||
/// Loads the IR driver at path
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Newtonsoft.Json;
|
||||
|
|
@ -34,6 +35,15 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { HdmiOut, AnyAudioOut };
|
||||
}
|
||||
|
||||
public void PrintExpectedIrCommands()
|
||||
{
|
||||
var cmds = typeof (AppleTvIrCommands).GetCType().GetFields(BindingFlags.Public | BindingFlags.Static);
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -192,14 +202,15 @@ namespace PepperDash.Essentials.Devices.Common
|
|||
|
||||
public static class AppleTvIrCommands
|
||||
{
|
||||
public const string Up = "UP_ARROW";
|
||||
public const string Down = "DOWN_ARROW";
|
||||
public const string Left = "LEFT_ARROW";
|
||||
public const string Right = "RIGHT_ARROW";
|
||||
public const string Enter = "SELECT";
|
||||
public const string PlayPause = "PLAY_PAUSE";
|
||||
public const string Rewind = "REWIND";
|
||||
public const string Menu = "MENU";
|
||||
public const string FastForward = "FASTFORWARD";
|
||||
|
||||
public static string Up = "+";
|
||||
public static string Down = "-";
|
||||
public static string Left = IROutputStandardCommands.IROut_TRACK_MINUS;
|
||||
public static string Right = IROutputStandardCommands.IROut_TRACK_PLUS;
|
||||
public static string Enter = IROutputStandardCommands.IROut_ENTER;
|
||||
public static string PlayPause = "PLAY/PAUSE";
|
||||
public static string Rewind = "REWIND";
|
||||
public static string Menu = "Menu";
|
||||
public static string FastForward = "FASTFORWARD";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue