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
{
public class TPConfig : DeviceConfig
{
new public TPConfigProperties Properties { get; set; }
}
//public class TPConfig : DeviceConfig
//{
// new public TPConfigProperties Properties { get; set; }
//}
public class TPConfigProperties
{
/*
"properties": {
"ipId": "aa",
"defaultSystemKey": "system1",
"sgdPath": "\\NVRAM\\Program1\\Sgds\\PepperDash Essentials TSW1050_v0.9.sgd",
"usesSplashPage": true,
"showDate": true,
"showTime": false
}
*/
public uint IpId { get; set; }
public string deafultSystemKey { get; set; }
public string SgdPath { get; set; }
public bool UsesSplashPage { get; set; }
public bool ShowDate { get; set; }
public bool ShowTime { get; set; }
//public class TPConfigProperties
//{
// /*
// "properties": {
// "ipId": "aa",
// "defaultSystemKey": "system1",
// "sgdPath": "\\NVRAM\\Program1\\Sgds\\PepperDash Essentials TSW1050_v0.9.sgd",
// "usesSplashPage": true,
// "showDate": true,
// "showTime": false
// }
// */
// public uint IpId { get; set; }
// public string deafultSystemKey { get; set; }
// public string SgdPath { get; set; }
// public bool UsesSplashPage { get; set; }
// public bool ShowDate { get; set; }
// public bool ShowTime { get; set; }
}
//}
/// <summary>
/// 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
/// and then returns the enum value using Enum.Parse
/// </summary>
public class TPPropertiesConverter : JsonConverter
{
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
return JObject.Load(reader);
}
///// <summary>
///// 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
///// and then returns the enum value using Enum.Parse
///// </summary>
//public class TPPropertiesConverter : JsonConverter
//{
// public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
// {
// return JObject.Load(reader);
// }
/// <summary>
/// This will be hit with every value in the ComPortConfig class. We only need to
/// do custom conversion on the comspec items.
/// </summary>
public override bool CanConvert(Type objectType)
{
return true;
}
// /// <summary>
// /// This will be hit with every value in the ComPortConfig class. We only need to
// /// do custom conversion on the comspec items.
// /// </summary>
// public override bool CanConvert(Type objectType)
// {
// return true;
// }
public override bool CanRead { get { return true; } }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
throw new NotImplementedException();
}
}
// public override bool CanRead { get { return true; } }
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
// {
// throw new NotImplementedException();
// }
//}
}

View File

@@ -146,6 +146,11 @@ namespace PepperDash.Essentials
/// </summary>
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>

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.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.PageManagers;
@@ -156,8 +157,6 @@ namespace PepperDash.Essentials
/// </summary>
CTimer PowerOffTimer;
//bool IsSharingModeAdvanced;
/// <summary>
/// Constructor
/// </summary>
@@ -169,7 +168,7 @@ namespace PepperDash.Essentials
Parent = parent;
ActivityFooterSrl = new SubpageReferenceList(TriList, 15022, 3, 3, 3);
SetupActivityFooterWhenRoomOff();
//SetupActivityFooterWhenRoomOff();
ShowVolumeGauge = true;
@@ -255,6 +254,8 @@ namespace PepperDash.Essentials
CancelPowerOff();
});
SetupActivityFooterWhenRoomOff();
base.Show();
}
@@ -394,7 +395,7 @@ namespace PepperDash.Essentials
{
if (LastSelectedSourceSig != null)
LastSelectedSourceSig.BoolValue = false;
SourceListButtonPress(localSrcItem);
PendingSource = localSrcItem;
LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1);
LastSelectedSourceSig.BoolValue = true;
}
@@ -425,30 +426,11 @@ namespace PepperDash.Essentials
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>
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)
LastSelectedSourceSig.BoolValue = false;
}
@@ -495,10 +477,12 @@ namespace PepperDash.Essentials
ActivityFooterSrl.Clear();
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl, 0,
b => { if (!b) ShareButtonPressed(); }));
// only show phone call when there's a dialer present
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl, 1,
b => { }));
ActivityFooterSrl.Count = 2;
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 1;
ActivityFooterSrl.Count = (ushort)(CurrentRoom.HasAudioDialer ? 2 : 1);
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue =
(ushort)(CurrentRoom.HasAudioDialer ? 1 : 0);
}
/// <summary>
@@ -509,13 +493,24 @@ namespace PepperDash.Essentials
ActivityFooterSrl.Clear();
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, ActivityFooterSrl,
0, null));
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl,
1, b => { if (!b) ShareButtonPressed(); }));
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl,
3, b => { if (!b) PowerButtonPressed(); }));
ActivityFooterSrl.Count = 3;
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 2;
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
if (CurrentRoom.HasAudioDialer)
{
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, ActivityFooterSrl,
1, b => { }));
ActivityFooterSrl.AddItem(new SubpageReferenceListActivityItem(3, ActivityFooterSrl,
3, b => { if (!b) PowerButtonPressed(); }));
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>
@@ -792,9 +787,21 @@ namespace PepperDash.Essentials
/// </summary>
void _CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
var isSource = info != null;
TriList.BooleanInput[UIBoolJoin.Display1SelectPress].BoolValue = isSource;
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>
@@ -802,9 +809,21 @@ namespace PepperDash.Essentials
/// </summary>
void _CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
var isSource = info != null;
TriList.BooleanInput[UIBoolJoin.Display2SelectPress].BoolValue = isSource;
if (type == ChangeType.DidChange)
{
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>

View File

@@ -10,8 +10,8 @@
<ArchiveName />
</RequiredInfo>
<OptionalInfo>
<CompiledOn>2/20/2017 5:05:08 PM</CompiledOn>
<CompilerRev>1.0.0.30753</CompilerRev>
<CompiledOn>2/21/2017 4:26:38 PM</CompiledOn>
<CompilerRev>1.0.0.29597</CompilerRev>
</OptionalInfo>
<Plugin>
<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
MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c
ü
@@ -42,13 +42,13 @@ DependencySource=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
DependencyPath=PepperDashEssentials.cpz:PepperDashCorePortalSync.dll
DependencyMainAssembly=PepperDashCorePortalSync.dll:815e608cb8a8808dab167837cf89b15a
ü
DependencySource=PepperDash_Core.dll:99fe5dcaaf81523443764e14332eb8ec
DependencySource=PepperDash_Core.dll:f8093aacbe4fa6cef78b7af4d978e897
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
DependencyMainAssembly=PepperDash_Essentials_Core.dll:6af3638bcef46f41ff56cdd5fe464b75
DependencyMainAssembly=PepperDash_Essentials_Core.dll:256362de10256ebe743008bc9415648e
ü
DependencySource=PepperDash_Essentials_Displays.dll:3135ef6b8f66b5b1bc5223aad3ef66e0
DependencyPath=PepperDashEssentials.cpz:PepperDash_Essentials_Displays.dll