mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 12:15:01 +00:00
Strange issue in HeaderDriver.SetupHeaderButtons with avDriver being null. Need to investigate further
This commit is contained in:
@@ -36,7 +36,7 @@ namespace PepperDash.Essentials
|
|||||||
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is EssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
Debug.Console(0, panelController, "Adding huddle space driver");
|
Debug.Console(0, panelController, "Adding huddle space AV driver");
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
||||||
@@ -49,7 +49,10 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
// Environment Driver
|
// Environment Driver
|
||||||
if (avDriver.CurrentRoom.Config.Environment != null && avDriver.CurrentRoom.Config.Environment.DeviceKeys.Count > 0)
|
if (avDriver.CurrentRoom.Config.Environment != null && avDriver.CurrentRoom.Config.Environment.DeviceKeys.Count > 0)
|
||||||
|
{
|
||||||
|
Debug.Console(0, panelController, "Adding environment driver");
|
||||||
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
||||||
|
}
|
||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
||||||
|
|
||||||
@@ -85,7 +88,7 @@ namespace PepperDash.Essentials
|
|||||||
//}
|
//}
|
||||||
else if (room is EssentialsHuddleVtc1Room)
|
else if (room is EssentialsHuddleVtc1Room)
|
||||||
{
|
{
|
||||||
Debug.Console(0, panelController, "Adding huddle space driver");
|
Debug.Console(0, panelController, "Adding huddle space VTC AV driver");
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
||||||
@@ -102,7 +105,10 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
// Environment Driver
|
// Environment Driver
|
||||||
if (avDriver.CurrentRoom.Config.Environment != null && avDriver.CurrentRoom.Config.Environment.DeviceKeys.Count > 0)
|
if (avDriver.CurrentRoom.Config.Environment != null && avDriver.CurrentRoom.Config.Environment.DeviceKeys.Count > 0)
|
||||||
|
{
|
||||||
|
Debug.Console(0, panelController, "Adding environment driver");
|
||||||
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
|
||||||
|
}
|
||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace PepperDash.Essentials
|
|||||||
// Gear
|
// Gear
|
||||||
TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
|
TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
|
||||||
TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000,
|
TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000,
|
||||||
Parent.AvDriver.ShowTech,
|
avDriver.ShowTech,
|
||||||
null,
|
null,
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
@@ -98,6 +98,19 @@ namespace PepperDash.Essentials
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint SetUpEnvironmentButton(EssentialsEnvironmentDriver environmentDriver, uint nextJoin)
|
||||||
|
{
|
||||||
|
if (environmentDriver != null)
|
||||||
|
{
|
||||||
|
TriList.SetString(nextJoin, "Lights");
|
||||||
|
TriList.SetSigFalseAction(nextJoin, environmentDriver.Show);
|
||||||
|
|
||||||
|
return nextJoin--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return nextJoin;
|
||||||
|
}
|
||||||
|
|
||||||
uint SetUpCalendarButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin)
|
uint SetUpCalendarButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin)
|
||||||
{
|
{
|
||||||
// Calendar button
|
// Calendar button
|
||||||
@@ -185,6 +198,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
uint nextJoin = 3953;
|
uint nextJoin = 3953;
|
||||||
|
|
||||||
|
nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin);
|
||||||
|
|
||||||
nextJoin = SetUpCalendarButton(avDriver, nextJoin);
|
nextJoin = SetUpCalendarButton(avDriver, nextJoin);
|
||||||
|
|
||||||
nextJoin = SetUpCallButton(avDriver, nextJoin);
|
nextJoin = SetUpCallButton(avDriver, nextJoin);
|
||||||
@@ -218,8 +233,12 @@ namespace PepperDash.Essentials
|
|||||||
ComputeHeaderCallStatus(currentRoom.VideoCodec);
|
ComputeHeaderCallStatus(currentRoom.VideoCodec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type
|
||||||
|
/// </summary>
|
||||||
public void SetupHeaderButtons(EssentialsHuddleSpaceRoom currentRoom)
|
public void SetupHeaderButtons(EssentialsHuddleSpaceRoom currentRoom)
|
||||||
{
|
{
|
||||||
|
#warning This is returning avDriver as null
|
||||||
var avDriver = Parent.AvDriver as EssentialsHuddlePanelAvFunctionsDriver;
|
var avDriver = Parent.AvDriver as EssentialsHuddlePanelAvFunctionsDriver;
|
||||||
|
|
||||||
HeaderButtonsAreSetUp = false;
|
HeaderButtonsAreSetUp = false;
|
||||||
@@ -228,23 +247,13 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
var roomConf = currentRoom.Config;
|
var roomConf = currentRoom.Config;
|
||||||
|
|
||||||
|
SetUpGear(avDriver, currentRoom);
|
||||||
//SetUpGear(avDriver, currentRoom);
|
|
||||||
|
|
||||||
SetUpHelpButton(roomConf);
|
SetUpHelpButton(roomConf);
|
||||||
|
|
||||||
uint nextJoin = 3953;
|
uint nextJoin = 3953;
|
||||||
|
|
||||||
//// Calendar button
|
nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin);
|
||||||
//if (_CurrentRoom.ScheduleSource != null)
|
|
||||||
//{
|
|
||||||
// TriList.SetString(nextJoin, "Calendar");
|
|
||||||
// TriList.SetSigFalseAction(nextJoin, CalendarPress);
|
|
||||||
|
|
||||||
// nextJoin--;
|
|
||||||
//}
|
|
||||||
|
|
||||||
//nextJoin--;
|
|
||||||
|
|
||||||
// blank any that remain
|
// blank any that remain
|
||||||
for (var i = nextJoin; i > 3950; i--)
|
for (var i = nextJoin; i > 3950; i--)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user