mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-13 19:54:59 +00:00
Try catch on some Fusion usage bugs; Fixed press-hold on TriListExtensions
This commit is contained in:
@@ -71,7 +71,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (handler != null)
|
||||
{
|
||||
Debug.Console(1, "Device Usage Ended at {1}. In use for {2} minutes.", UsageEndTime, timeUsed.Minutes);
|
||||
Debug.Console(1, "Device Usage Ended at {0}. In use for {1} minutes.", UsageEndTime, timeUsed.Minutes);
|
||||
handler(this, new DeviceUsageEventArgs() { UsageEndTime = UsageEndTime, MinutesUsed = timeUsed.Minutes });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
@@ -75,11 +77,12 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
if (press)
|
||||
{
|
||||
|
||||
// Could insert a pressed action here
|
||||
heldTimer = new CTimer(o =>
|
||||
{
|
||||
// if still held and there's an action
|
||||
if (tl.BooleanInput[sigNum].BoolValue && heldAction != null)
|
||||
if (tl.BooleanOutput[sigNum].BoolValue && heldAction != null)
|
||||
// Hold action here
|
||||
heldAction();
|
||||
}, heldMs);
|
||||
|
||||
Reference in New Issue
Block a user