mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-06 16:25:01 +00:00
Fixed bug with directory browsing not returning to root from 2 layers deep. Added message to first item of meetings SRL to indicate no meeting that day.
This commit is contained in:
@@ -121,7 +121,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
protected override Func<string> SharingSourceFeedbackFunc
|
||||
{
|
||||
#warning verify that source feedback to room works from codec
|
||||
get
|
||||
{
|
||||
return () => PresentationSourceKey;
|
||||
@@ -208,6 +207,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
CTimer LoginMessageReceived;
|
||||
|
||||
// **___________________________________________________________________**
|
||||
// Timers to be moved to the global system timer at a later point....
|
||||
CTimer BookingsRefreshTimer;
|
||||
CTimer PhonebookRefreshTimer;
|
||||
// **___________________________________________________________________**
|
||||
|
||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||
public RoutingInputPort HdmiIn2 { get; private set; }
|
||||
@@ -349,8 +354,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
GetCallHistory();
|
||||
|
||||
PhonebookRefreshTimer = new CTimer(CheckCurrentHour, 3600000, 3600000); // check each hour to see if the phonebook should be downloaded
|
||||
GetPhonebook(null);
|
||||
|
||||
BookingsRefreshTimer = new CTimer(GetBookings, 900000, 900000); // 15 minute timer to check for new booking info
|
||||
GetBookings(null);
|
||||
}
|
||||
|
||||
@@ -372,12 +379,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
if (e.Client.IsConnected)
|
||||
{
|
||||
//LoginMessageReceived.Reset();
|
||||
LoginMessageReceived.Reset(5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
SyncState.CodecDisconnected();
|
||||
PhonebookSyncState.CodecDisconnected();
|
||||
|
||||
if (PhonebookRefreshTimer != null)
|
||||
{
|
||||
PhonebookRefreshTimer.Stop();
|
||||
PhonebookRefreshTimer = null;
|
||||
}
|
||||
|
||||
if (BookingsRefreshTimer != null)
|
||||
{
|
||||
BookingsRefreshTimer.Stop();
|
||||
BookingsRefreshTimer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,6 +698,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
if(codecBookings.CommandResponse.BookingsListResult.ResultInfo.TotalRows.Value != "0")
|
||||
CodecSchedule.Meetings = CiscoCodecBookings.GetGenericMeetingsFromBookingResult(codecBookings.CommandResponse.BookingsListResult.Booking);
|
||||
|
||||
BookingsRefreshTimer.Reset(900000, 900000);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -751,11 +771,28 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// Gets the bookings for today
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
public void GetBookings(string command)
|
||||
public void GetBookings(object command)
|
||||
{
|
||||
Debug.Console(1, this, "Retrieving Booking Info from Codec. Current Time: {0}", DateTime.Now.ToLocalTime());
|
||||
|
||||
SendText("xCommand Bookings List Days: 1 DayOffset: 0");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks to see if it is 2am (or within that hour) and triggers a download of the phonebook
|
||||
/// </summary>
|
||||
/// <param name="o"></param>
|
||||
public void CheckCurrentHour(object o)
|
||||
{
|
||||
if (DateTime.Now.Hour == 2)
|
||||
{
|
||||
Debug.Console(1, this, "Checking hour to see if phonebook should be downloaded. Current hour is {0}", DateTime.Now.Hour);
|
||||
|
||||
GetPhonebook(null);
|
||||
PhonebookRefreshTimer.Reset(3600000, 3600000);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Triggers a refresh of the codec phonebook
|
||||
/// </summary>
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace PepperDash.Essentials.Room.Config
|
||||
|
||||
var rm = new EssentialsHuddleVtc1Room(Key, Name, disp, codec, codec, props);
|
||||
// Add Occupancy object from config
|
||||
#warning Add in occupancy object from confic if found and link up device to occupancy feedback
|
||||
#warning Add in occupancy object from config if found and link up device to occupancy feedback
|
||||
rm.LogoUrl = props.Logo.GetUrl();
|
||||
rm.SourceListKey = props.SourceListKey;
|
||||
rm.DefaultSourceItem = props.DefaultSourceItem;
|
||||
|
||||
@@ -1040,6 +1040,17 @@ namespace PepperDash.Essentials
|
||||
});
|
||||
}
|
||||
MeetingOrContactMethodModalSrl.Count = i;
|
||||
|
||||
if (i == 0) // Show item indicating no meetings are booked for rest of day
|
||||
{
|
||||
MeetingOrContactMethodModalSrl.Count = 1;
|
||||
|
||||
MeetingOrContactMethodModalSrl.StringInputSig(1, 1).StringValue = string.Empty;
|
||||
MeetingOrContactMethodModalSrl.StringInputSig(1, 2).StringValue = string.Empty;
|
||||
MeetingOrContactMethodModalSrl.StringInputSig(1, 3).StringValue = "No Meetings are booked for the remainder of the day.";
|
||||
MeetingOrContactMethodModalSrl.StringInputSig(1, 4).StringValue = string.Empty;
|
||||
MeetingOrContactMethodModalSrl.StringInputSig(1, 5).StringValue = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -61,7 +61,12 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
CodecDirectory CurrentDirectoryResult;
|
||||
|
||||
string LastFolderRequestedParentFolderId;
|
||||
/// <summary>
|
||||
/// Tracks the directory browse history when browsing beyond the root directory
|
||||
/// </summary>
|
||||
List<CodecDirectory> DirectoryBrowseHistory;
|
||||
|
||||
bool NextDirectoryResultIsFolderContents;
|
||||
|
||||
BoolFeedback DirectoryBackButtonVisibleFeedback;
|
||||
|
||||
@@ -467,6 +472,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
void SetupDirectoryList()
|
||||
{
|
||||
DirectoryBrowseHistory = new List<CodecDirectory>();
|
||||
|
||||
var codec = Codec as IHasDirectory;
|
||||
if (codec != null)
|
||||
{
|
||||
@@ -498,7 +505,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
void SetCurrentDirectoryToRoot()
|
||||
{
|
||||
LastFolderRequestedParentFolderId = string.Empty;
|
||||
DirectoryBrowseHistory.Clear();
|
||||
|
||||
CurrentDirectoryResult = (Codec as IHasDirectory).DirectoryRoot;
|
||||
|
||||
@@ -533,6 +540,11 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// <param name="e"></param>
|
||||
void dir_DirectoryResultReturned(object sender, DirectoryEventArgs e)
|
||||
{
|
||||
if (NextDirectoryResultIsFolderContents)
|
||||
{
|
||||
NextDirectoryResultIsFolderContents = false;
|
||||
DirectoryBrowseHistory.Add(e.Directory);
|
||||
}
|
||||
CurrentDirectoryResult = e.Directory;
|
||||
DirectoryBackButtonVisibleFeedback.FireUpdate();
|
||||
RefreshDirectory();
|
||||
@@ -544,12 +556,9 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// <param name="folderId"></param>
|
||||
void GetDirectoryFolderContents(DirectoryFolder folder)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(folder.ParentFolderId))
|
||||
LastFolderRequestedParentFolderId = folder.ParentFolderId;
|
||||
else
|
||||
LastFolderRequestedParentFolderId = string.Empty;
|
||||
|
||||
(Codec as IHasDirectory).GetDirectoryFolderContents(folder.FolderId);
|
||||
|
||||
NextDirectoryResultIsFolderContents = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -559,14 +568,18 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
var codec = Codec as IHasDirectory;
|
||||
|
||||
if (!string.IsNullOrEmpty(LastFolderRequestedParentFolderId))
|
||||
codec.GetDirectoryFolderContents(LastFolderRequestedParentFolderId);
|
||||
if (DirectoryBrowseHistory.Count > 0)
|
||||
{
|
||||
var lastItemIndex = DirectoryBrowseHistory.Count - 1;
|
||||
CurrentDirectoryResult = DirectoryBrowseHistory[lastItemIndex];
|
||||
DirectoryBrowseHistory.Remove(DirectoryBrowseHistory[lastItemIndex]);
|
||||
|
||||
RefreshDirectory();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetCurrentDirectoryToRoot();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -709,7 +722,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user