Working through little details on ecs-213

This commit is contained in:
Heath Volmer
2017-02-21 16:31:47 -07:00
parent 250e50e393
commit 0862a5db43
17 changed files with 161 additions and 90 deletions

View File

@@ -13,60 +13,60 @@ using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials namespace PepperDash.Essentials
{ {
public class TPConfig : DeviceConfig //public class TPConfig : DeviceConfig
{ //{
new public TPConfigProperties Properties { get; set; } // new public TPConfigProperties Properties { get; set; }
} //}
public class TPConfigProperties //public class TPConfigProperties
{ //{
/* // /*
"properties": { // "properties": {
"ipId": "aa", // "ipId": "aa",
"defaultSystemKey": "system1", // "defaultSystemKey": "system1",
"sgdPath": "\\NVRAM\\Program1\\Sgds\\PepperDash Essentials TSW1050_v0.9.sgd", // "sgdPath": "\\NVRAM\\Program1\\Sgds\\PepperDash Essentials TSW1050_v0.9.sgd",
"usesSplashPage": true, // "usesSplashPage": true,
"showDate": true, // "showDate": true,
"showTime": false // "showTime": false
} // }
*/ // */
public uint IpId { get; set; } // public uint IpId { get; set; }
public string deafultSystemKey { get; set; } // public string deafultSystemKey { get; set; }
public string SgdPath { get; set; } // public string SgdPath { get; set; }
public bool UsesSplashPage { get; set; } // public bool UsesSplashPage { get; set; }
public bool ShowDate { get; set; } // public bool ShowDate { get; set; }
public bool ShowTime { get; set; } // public bool ShowTime { get; set; }
} //}
/// <summary> ///// <summary>
/// The gist of this converter: The comspec JSON comes in with normal values that need to be converted ///// The gist of this converter: The comspec JSON comes in with normal values that need to be converted
/// into enum names. This converter takes the value and applies the appropriate enum's name prefix to the value ///// into enum names. This converter takes the value and applies the appropriate enum's name prefix to the value
/// and then returns the enum value using Enum.Parse ///// and then returns the enum value using Enum.Parse
/// </summary> ///// </summary>
public class TPPropertiesConverter : JsonConverter //public class TPPropertiesConverter : JsonConverter
{ //{
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) // public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{ // {
return JObject.Load(reader); // return JObject.Load(reader);
} // }
/// <summary> // /// <summary>
/// This will be hit with every value in the ComPortConfig class. We only need to // /// This will be hit with every value in the ComPortConfig class. We only need to
/// do custom conversion on the comspec items. // /// do custom conversion on the comspec items.
/// </summary> // /// </summary>
public override bool CanConvert(Type objectType) // public override bool CanConvert(Type objectType)
{ // {
return true; // return true;
} // }
public override bool CanRead { get { return true; } } // public override bool CanRead { get { return true; } }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) // public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{ // {
throw new NotImplementedException(); // throw new NotImplementedException();
} // }
} //}
} }

View File

@@ -146,6 +146,11 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
public BoolFeedback OnFeedback { get; private set; } public BoolFeedback OnFeedback { get; private set; }
/// <summary>
/// If an audio dialer is available for this room
/// </summary>
public bool HasAudioDialer { get { return false; } }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>

View File

@@ -0,0 +1,47 @@
2/21/2017 8:53:37 AM, Info: Initializing SIMPLSharp Services...
2/21/2017 8:53:37 AM, Info: ProjectInfo successfully initialized.
2/21/2017 12:43:46 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 12:43:47 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 12:43:48 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 12:43:49 PM, Info: Saving project information...
2/21/2017 2:29:36 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 2:29:36 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 2:29:37 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 2:29:38 PM, Info: Saving project information...
2/21/2017 2:30:21 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 2:30:22 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 2:30:22 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 2:30:23 PM, Info: Saving project information...
2/21/2017 3:06:54 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 3:06:55 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 3:06:55 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 3:06:56 PM, Info: Saving project information...
2/21/2017 3:27:24 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 3:27:24 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 3:27:24 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 3:27:26 PM, Info: Saving project information...
2/21/2017 3:30:51 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 3:30:52 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 3:30:52 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 3:30:53 PM, Info: Saving project information...
2/21/2017 3:49:36 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 3:49:37 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 3:49:37 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 3:49:38 PM, Info: Saving project information...
2/21/2017 3:53:43 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 3:53:43 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 3:53:44 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 3:53:45 PM, Info: Saving project information...
2/21/2017 4:19:33 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 4:19:33 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 4:19:33 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 4:19:34 PM, Info: Saving project information...
2/21/2017 4:23:46 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 4:23:47 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 4:23:47 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 4:23:48 PM, Info: Saving project information...
2/21/2017 4:26:37 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/21/2017 4:26:38 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/21/2017 4:26:38 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/21/2017 4:26:39 PM, Info: Saving project information...
2/21/2017 4:30:57 PM, Info: Terminating SIMPLSharp Services

View File

@@ -6,6 +6,7 @@ using Crestron.SimplSharpPro;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.SmartObjects; using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.PageManagers; using PepperDash.Essentials.Core.PageManagers;
@@ -156,8 +157,6 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
CTimer PowerOffTimer; CTimer PowerOffTimer;
//bool IsSharingModeAdvanced;
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>
@@ -169,7 +168,7 @@ namespace PepperDash.Essentials
Parent = parent; Parent = parent;
ActivityFooterSrl = new SubpageReferenceList(TriList, 15022, 3, 3, 3); ActivityFooterSrl = new SubpageReferenceList(TriList, 15022, 3, 3, 3);
SetupActivityFooterWhenRoomOff(); //SetupActivityFooterWhenRoomOff();
ShowVolumeGauge = true; ShowVolumeGauge = true;
@@ -255,6 +254,8 @@ namespace PepperDash.Essentials
CancelPowerOff(); CancelPowerOff();
}); });
SetupActivityFooterWhenRoomOff();
base.Show(); base.Show();
} }
@@ -394,7 +395,7 @@ namespace PepperDash.Essentials
{ {
if (LastSelectedSourceSig != null) if (LastSelectedSourceSig != null)
LastSelectedSourceSig.BoolValue = false; LastSelectedSourceSig.BoolValue = false;
SourceListButtonPress(localSrcItem); PendingSource = localSrcItem;
LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1); LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1);
LastSelectedSourceSig.BoolValue = true; LastSelectedSourceSig.BoolValue = true;
} }
@@ -425,30 +426,11 @@ namespace PepperDash.Essentials
ShowCurrentSharingMode(); ShowCurrentSharingMode();
} }
/// <summary>
///
/// </summary>
/// <param name="item"></param>
public void SourceListButtonPress(SourceListItem item)
{
// start the timer
// show FB on potential source
TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = false;
TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = false;
TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = false;
TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = false;
PendingSource = item;
}
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
void EnableAppropriateDisplayButtons() void EnableAppropriateDisplayButtons()
{ {
TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = true;
TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = true;
TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = true;
TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = true;
if (LastSelectedSourceSig != null) if (LastSelectedSourceSig != null)
LastSelectedSourceSig.BoolValue = false; LastSelectedSourceSig.BoolValue = false;
} }
@@ -495,10 +477,12 @@ namespace PepperDash.Essentials
ActivityFooterSrl.Clear(); ActivityFooterSrl.Clear();
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0, ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0,
b => { if (!b) ShareButtonPressed(); })); b => { if (!b) ShareButtonPressed(); }));
// only show phone call when there's a dialer present
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 1, ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 1,
b => { })); b => { }));
ActivityFooterSrl.Count = 2; ActivityFooterSrl.Count = (ushort)(CurrentRoom.HasAudioDialer ? 2 : 1);
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 1; TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue =
(ushort)(CurrentRoom.HasAudioDialer ? 1 : 0);
} }
/// <summary> /// <summary>
@@ -509,13 +493,24 @@ namespace PepperDash.Essentials
ActivityFooterSrl.Clear(); ActivityFooterSrl.Clear();
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl,
0, null)); 0, null));
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, if (CurrentRoom.HasAudioDialer)
1, b => { if (!b) ShareButtonPressed(); })); {
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl, ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl,
3, b => { if (!b) PowerButtonPressed(); })); 1, b => { }));
ActivityFooterSrl.Count = 3; ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl,
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 2; 3, b => { if (!b) PowerButtonPressed(); }));
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1); ActivityFooterSrl.Count = 3;
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 2;
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
}
else
{
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl,
3, b => { if (!b) PowerButtonPressed(); }));
ActivityFooterSrl.Count = 2;
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 1;
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(2, 1);
}
} }
/// <summary> /// <summary>
@@ -792,9 +787,21 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void _CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) void _CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{ {
var isSource = info != null;
TriList.BooleanInput[UIBoolJoin.Display1SelectPress].BoolValue = isSource;
if (type == ChangeType.DidChange) if (type == ChangeType.DidChange)
TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = {
info == null ? "" : info.PreferredName; TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue =
isSource ? info.PreferredName : "";
if (!isSource)
return;
// enable audio and control buttons
var devConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key == info.SourceKey);
TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue =
ConfigPropertiesHelpers.GetHasAudio(devConfig);
TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue =
ConfigPropertiesHelpers.GetHasControls(devConfig);
}
} }
/// <summary> /// <summary>
@@ -802,9 +809,21 @@ namespace PepperDash.Essentials
/// </summary> /// </summary>
void _CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) void _CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{ {
var isSource = info != null;
TriList.BooleanInput[UIBoolJoin.Display2SelectPress].BoolValue = isSource;
if (type == ChangeType.DidChange) if (type == ChangeType.DidChange)
{
TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue =
info == null ? "" : info.PreferredName; isSource ? info.PreferredName : "";
if (!isSource)
return;
// enable audio and control buttons
var devConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key == info.SourceKey);
TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue =
ConfigPropertiesHelpers.GetHasAudio(devConfig);
TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue =
ConfigPropertiesHelpers.GetHasControls(devConfig);
}
} }
/// <summary> /// <summary>

View File

@@ -10,8 +10,8 @@
<ArchiveName /> <ArchiveName />
</RequiredInfo> </RequiredInfo>
<OptionalInfo> <OptionalInfo>
<CompiledOn>2/20/2017 5:05:08 PM</CompiledOn> <CompiledOn>2/21/2017 4:26:38 PM</CompiledOn>
<CompilerRev>1.0.0.30753</CompilerRev> <CompilerRev>1.0.0.29597</CompilerRev>
</OptionalInfo> </OptionalInfo>
<Plugin> <Plugin>
<Version>Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version> <Version>Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10</Version>

View File

@@ -1,4 +1,4 @@
MainAssembly=PepperDashEssentials.dll:0b867fd313ed2c071ddab7aa55521c8b MainAssembly=PepperDashEssentials.dll:b4fc9364cff33bfd2015356e1d0ff2f8
MainAssemblyMinFirmwareVersion=1.009.0029 MainAssemblyMinFirmwareVersion=1.009.0029
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
ü ü
@@ -42,13 +42,13 @@ DependencySource=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
DependencyPath=PepperDashEssentials.cpz:PepperDashCorePortalSync.dll DependencyPath=PepperDashEssentials.cpz:PepperDashCorePortalSync.dll
DependencyMainAssembly=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a DependencyMainAssembly=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
ü ü
DependencySource=PepperDash_Core.dll:99fe5dcaaf81523443764e14332eb8ec DependencySource=PepperDash_Core.dll:f8093aacbe4fa6cef78b7af4d978e897
DependencyPath=PepperDashEssentials.cpz:PepperDash_Core.dll DependencyPath=PepperDashEssentials.cpz:PepperDash_Core.dll
DependencyMainAssembly=PepperDash_Core.dll:99fe5dcaaf81523443764e14332eb8ec DependencyMainAssembly=PepperDash_Core.dll:f8093aacbe4fa6cef78b7af4d978e897
ü ü
DependencySource=PepperDash_Essentials_Core.dll:6af3638bcef46f41ff56cdd5fe464b75 DependencySource=PepperDash_Essentials_Core.dll:256362de10256ebe743008bc9415648e
DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Core.dll DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Core.dll
DependencyMainAssembly=PepperDash_Essentials_Core.dll:6af3638bcef46f41ff56cdd5fe464b75 DependencyMainAssembly=PepperDash_Essentials_Core.dll:256362de10256ebe743008bc9415648e
ü ü
DependencySource=PepperDash_Essentials_Displays.dll:3135ef6b8f66b5b1bc5223aad3ef66e0 DependencySource=PepperDash_Essentials_Displays.dll:3135ef6b8f66b5b1bc5223aad3ef66e0
DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Displays.dll DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Displays.dll