mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
Tech PIN from config
This commit is contained in:
@@ -102,7 +102,6 @@ namespace PepperDash.Essentials.Core
|
||||
eRoutingSignalType signalType, int cycle, RouteDescriptor routeTable)
|
||||
{
|
||||
cycle++;
|
||||
Debug.Console(2, destination, "*#* SelectInput-cycle {1}. Finding {2} route back to {0}", source.Key, cycle, signalType);
|
||||
var destDevInputTies = TieLineCollection.Default.Where(t =>
|
||||
t.DestinationPort.ParentDevice == destination && (t.Type == signalType || t.Type == eRoutingSignalType.AudioVideo));
|
||||
|
||||
@@ -115,7 +114,6 @@ namespace PepperDash.Essentials.Core
|
||||
RoutingInputPort goodInputPort = null;
|
||||
if (directTie != null) // Found a tie directly to the source
|
||||
{
|
||||
Debug.Console(2, destination, "*#* Found direct tie to {0}**", source.Key);
|
||||
goodInputPort = directTie.DestinationPort;
|
||||
}
|
||||
else // no direct-connect. Walk back devices.
|
||||
|
||||
@@ -182,7 +182,6 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
|
||||
// Good length, grab the message
|
||||
var message = newBytes.Skip(4).Take(msgLen).ToArray();
|
||||
Debug.Console(2, this, "*#* Parsing input: {0}", ComTextHelper.GetEscapedText(message));
|
||||
|
||||
// At this point, the ack/nak is the first byte
|
||||
if (message[0] == 0x41)
|
||||
@@ -254,7 +253,6 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
IsInStandby = true;
|
||||
if (powerByte == 0x00 && IsInStandby) // Ignore power off if coming from standby - glitch
|
||||
{
|
||||
Debug.Console(2, this, "*#* STANDBY GLITCH - IGNORING");
|
||||
IsInStandby = false;
|
||||
return;
|
||||
}
|
||||
@@ -319,7 +317,7 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
checksum = checksum & 0x000000FF; // mask off MSBs
|
||||
b[b.Length - 1] = (byte)checksum;
|
||||
if(Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
|
||||
Debug.Console(2, this, "*#* Sending:{0}", ComTextHelper.GetEscapedText(b));
|
||||
Debug.Console(2, this, "Sending:{0}", ComTextHelper.GetEscapedText(b));
|
||||
Communication.SendBytes(b);
|
||||
}
|
||||
|
||||
@@ -372,7 +370,6 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
// Fake cool-down cycle
|
||||
CooldownTimer = new CTimer(o =>
|
||||
{
|
||||
Debug.Console(2, this, "*#* Cooldown timer ending");
|
||||
_IsCoolingDown = false;
|
||||
IsCoolingDownFeedback.FireUpdate();
|
||||
}, CooldownTime);
|
||||
|
||||
@@ -110,6 +110,7 @@ namespace PepperDash.Essentials.Room.Config
|
||||
public EssentialsRoomAddressPropertiesConfig Addresses { get; set; }
|
||||
public EssentialsRoomOccSensorConfig OccupancySensors { get; set; }
|
||||
public EssentialsLogoPropertiesConfig Logo { get; set; }
|
||||
public EssentialsRoomTechConfig Tech { get; set; }
|
||||
public EssentialsRoomVolumesConfig Volumes { get; set; }
|
||||
}
|
||||
|
||||
@@ -176,4 +177,9 @@ namespace PepperDash.Essentials.Room.Config
|
||||
public List<string> Types { get; set; }
|
||||
}
|
||||
|
||||
public class EssentialsRoomTechConfig
|
||||
{
|
||||
public string Password { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -338,7 +338,6 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(1, this, "*#* EXCEPTION in end usage tracking:\r{0}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,19 +227,9 @@ namespace PepperDash.Essentials
|
||||
/// 2904
|
||||
/// </summary>
|
||||
public const uint KeyboardButton2Press = 2904;
|
||||
/// <summary>
|
||||
/// 2910
|
||||
/// </summary>
|
||||
//public const uint KeyboardClearPress = 2910;
|
||||
/// <summary>
|
||||
/// 2911
|
||||
/// </summary>
|
||||
//public const uint KeyboardClearVisible = 2911;
|
||||
|
||||
// Letter joins start at 2921;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 3101
|
||||
/// </summary>
|
||||
@@ -273,8 +263,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint TechSchedulerVisible = 3112;
|
||||
|
||||
|
||||
|
||||
//******************************************************
|
||||
/// <summary>
|
||||
/// 3811
|
||||
|
||||
@@ -537,11 +537,9 @@ namespace PepperDash.Essentials
|
||||
/// <param name="e"></param>
|
||||
void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||
{
|
||||
//Debug.Console(2, "*#*UI shutdown prompt finished");
|
||||
EndMeetingButtonSig.BoolValue = false;
|
||||
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -551,7 +549,6 @@ namespace PepperDash.Essentials
|
||||
/// <param name="e"></param>
|
||||
void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e)
|
||||
{
|
||||
//Debug.Console(2, "*#*UI shutdown prompt cancelled");
|
||||
if (PowerDownModal != null)
|
||||
PowerDownModal.HideDialog();
|
||||
EndMeetingButtonSig.BoolValue = false;
|
||||
|
||||
@@ -12,6 +12,7 @@ using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.SmartObjects;
|
||||
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
||||
using PepperDash.Essentials.Devices.Displays;
|
||||
using PepperDash.Essentials.Room.Config;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers
|
||||
{
|
||||
@@ -49,7 +50,7 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
|
||||
CTimer PinAuthorizedTimer;
|
||||
|
||||
string Pin;
|
||||
EssentialsRoomTechConfig Config;
|
||||
|
||||
StringBuilder PinEntryBuilder = new StringBuilder(4);
|
||||
|
||||
@@ -57,18 +58,16 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
|
||||
SmartObjectNumeric PinKeypad;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="trilist"></param>
|
||||
/// <param name="parent"></param>
|
||||
public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, IAVDriver parent, string pin)
|
||||
public EssentialsHuddleTechPageDriver(BasicTriListWithSmartObject trilist, IAVDriver parent, EssentialsRoomTechConfig config)
|
||||
: base(trilist)
|
||||
{
|
||||
Parent = parent;
|
||||
Pin = pin;
|
||||
Config = config;
|
||||
|
||||
PagesInterlock = new JoinedSigInterlock(trilist);
|
||||
PagesInterlock.SetButDontShow(UIBoolJoin.TechSystemStatusVisible);
|
||||
@@ -176,7 +175,7 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
// check it!
|
||||
if (len == 4)
|
||||
{
|
||||
if (Pin == PinEntryBuilder.ToString())
|
||||
if (Config.Password == PinEntryBuilder.ToString())
|
||||
{
|
||||
IsAuthorized = true;
|
||||
SetPinDotsFeedback(0);
|
||||
@@ -257,10 +256,8 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
d.Group.Equals("display", StringComparison.OrdinalIgnoreCase)
|
||||
|| d.Group.Equals("projector", StringComparison.OrdinalIgnoreCase))
|
||||
.Select(dd => dd.Key);
|
||||
Debug.Console(1, "#################### Config has {0} displays", devKeys.Count());
|
||||
var disps = DeviceManager.AllDevices.Where(d =>
|
||||
devKeys.Contains(d.Key));
|
||||
Debug.Console(1, "#################### Devices has {0} displays", disps.Count());
|
||||
ushort i = 0;
|
||||
foreach (var disp in disps)
|
||||
{
|
||||
|
||||
@@ -153,8 +153,7 @@ namespace PepperDash.Essentials
|
||||
get
|
||||
{
|
||||
if (_TechDriver == null)
|
||||
#warning HLV-Make PIN come from config!
|
||||
_TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, this, "1234");
|
||||
_TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, this, CurrentRoom.Config.Tech);
|
||||
return _TechDriver;
|
||||
}
|
||||
}
|
||||
@@ -390,7 +389,6 @@ namespace PepperDash.Essentials
|
||||
var ss = CurrentRoom.ScheduleSource;
|
||||
if (ss != null)
|
||||
{
|
||||
#warning HLV-Add some sort of every-minute "cron" thing to run these.
|
||||
NextMeetingTimer = new CTimer(o =>
|
||||
{
|
||||
if (CurrentRoom.OnFeedback.BoolValue)
|
||||
@@ -578,7 +576,6 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
else // room is on show what's active or select a source if nothing is yet active
|
||||
{
|
||||
Debug.Console(0, "*#*#*#*# ActivitySharPressed: CurrentSourceInfoKey={0}", CurrentRoom.CurrentSourceInfoKey);
|
||||
if(CurrentRoom.CurrentSourceInfo == null || CurrentRoom.CurrentSourceInfoKey == CurrentRoom.DefaultCodecRouteString)
|
||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, true);
|
||||
else if (CurrentSourcePageManager != null)
|
||||
|
||||
@@ -16,9 +16,6 @@ using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
|
||||
|
||||
#warning HLV - FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button
|
||||
/// <summary>
|
||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||
@@ -154,12 +151,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||
{
|
||||
var call = e.CallItem;
|
||||
Debug.Console(1, "*#* UI: Codec status {0}: {1} --> {2}", call.Name, e.PreviousStatus, e.NewStatus);
|
||||
switch (e.NewStatus)
|
||||
{
|
||||
case eCodecCallStatus.Connected:
|
||||
// fire at SRL item
|
||||
Debug.Console(1, "*#* UI: Call Connected {0}", call.Name);
|
||||
KeypadMode = eKeypadMode.DTMF;
|
||||
DialStringBuilder.Remove(0, DialStringBuilder.Length);
|
||||
DialStringFeedback.FireUpdate();
|
||||
@@ -170,15 +165,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
break;
|
||||
case eCodecCallStatus.Connecting:
|
||||
// fire at SRL item
|
||||
Debug.Console(1, "*#* UI: Call Connecting {0}", call.Name);
|
||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||
break;
|
||||
case eCodecCallStatus.Dialing:
|
||||
Debug.Console(1, "*#* UI: Call Dialing {0}", call.Name);
|
||||
Parent.ShowNotificationRibbon("Dialing", 0);
|
||||
break;
|
||||
case eCodecCallStatus.Disconnected:
|
||||
Debug.Console(1, "*#* UI: Call Disconnecting {0}", call.Name);
|
||||
if (!Codec.IsInCall)
|
||||
{
|
||||
KeypadMode = eKeypadMode.Dial;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user