mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Source-none confirmed; camera selects and FB
This commit is contained in:
@@ -122,17 +122,15 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// 833
|
/// 833
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const uint BCameraModeOff = 833;
|
const uint BCameraModeOff = 833;
|
||||||
/// <summary>
|
|
||||||
/// 836
|
|
||||||
/// </summary>
|
|
||||||
const uint BCameraNearEnd = 836;
|
|
||||||
/// <summary>
|
|
||||||
/// 837
|
|
||||||
/// </summary>
|
|
||||||
const uint BCameraFarEnd = 837;
|
|
||||||
|
|
||||||
/********* Ushorts *********/
|
/********* Ushorts *********/
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 760
|
||||||
|
/// </summary>
|
||||||
|
const uint UCameraNumberSelect = 760;
|
||||||
|
/// <summary>
|
||||||
/// 801
|
/// 801
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const uint UDirectorySelectRow = 801;
|
const uint UDirectorySelectRow = 801;
|
||||||
@@ -141,6 +139,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
const uint UDirectoryRowCount = 801;
|
const uint UDirectoryRowCount = 801;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/********* Strings *********/
|
/********* Strings *********/
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 701
|
/// 701
|
||||||
@@ -170,6 +170,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// 752
|
/// 752
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const uint SIncomingCallNumber = 752;
|
const uint SIncomingCallNumber = 752;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 800
|
/// 800
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -329,8 +330,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
EISC.SetSigTrueAction(BCameraModeManual, () => PostCameraMode());
|
EISC.SetSigTrueAction(BCameraModeManual, () => PostCameraMode());
|
||||||
EISC.SetSigTrueAction(BCameraModeOff, () => PostCameraMode());
|
EISC.SetSigTrueAction(BCameraModeOff, () => PostCameraMode());
|
||||||
|
|
||||||
EISC.SetSigTrueAction(BCameraNearEnd, PostSelectedCamera);
|
EISC.SetUShortSigAction(UCameraNumberSelect, (u) => PostSelectedCamera());
|
||||||
EISC.SetSigTrueAction(BCameraFarEnd, PostSelectedCamera);
|
|
||||||
|
|
||||||
// Add press and holds using helper action
|
// Add press and holds using helper action
|
||||||
Action<string, uint> addPHAction = (s, u) =>
|
Action<string, uint> addPHAction = (s, u) =>
|
||||||
@@ -355,9 +356,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
addAction("/cameraModeAuto", BCameraModeAuto);
|
addAction("/cameraModeAuto", BCameraModeAuto);
|
||||||
addAction("/cameraModeManual", BCameraModeManual);
|
addAction("/cameraModeManual", BCameraModeManual);
|
||||||
addAction("/cameraModeOff", BCameraModeOff);
|
addAction("/cameraModeOff", BCameraModeOff);
|
||||||
addAction("/cameraFarEnd", BCameraFarEnd);
|
|
||||||
addAction("/cameraNearEnd", BCameraNearEnd);
|
|
||||||
|
|
||||||
|
asc.AddAction("/cameraSelect", new Action<string>(SelectCamera));
|
||||||
|
|
||||||
// camera presets
|
// camera presets
|
||||||
for(uint i = 0; i < 6; i++)
|
for(uint i = 0; i < 6; i++)
|
||||||
@@ -369,7 +369,8 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
// Get status
|
// Get status
|
||||||
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
|
asc.AddAction(MessagePath + "/fullStatus", new Action(PostFullStatus));
|
||||||
// Dial on string
|
// Dial on string
|
||||||
asc.AddAction(MessagePath + "/dial", new Action<string>(s => EISC.SetString(SCurrentDialString, s)));
|
asc.AddAction(MessagePath + "/dial", new Action<string>(s =>
|
||||||
|
EISC.SetString(SCurrentDialString, s)));
|
||||||
// Pulse DTMF
|
// Pulse DTMF
|
||||||
asc.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
|
asc.AddAction(MessagePath + "/dtmf", new Action<string>(s =>
|
||||||
{
|
{
|
||||||
@@ -531,9 +532,16 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
string GetSelectedCamera()
|
string GetSelectedCamera()
|
||||||
{
|
{
|
||||||
|
var num = EISC.GetUshort(UCameraNumberSelect);
|
||||||
string m;
|
string m;
|
||||||
if (EISC.GetBool(BCameraNearEnd)) m = "camera1";
|
if (num == 100)
|
||||||
else m = "cameraFar";
|
{
|
||||||
|
m = "cameraFar";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m = "camera" + num;
|
||||||
|
}
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -559,6 +567,23 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="s"></param>
|
||||||
|
void SelectCamera(string s)
|
||||||
|
{
|
||||||
|
var cam = s.Substring(6);
|
||||||
|
if (cam.ToLower() == "far")
|
||||||
|
{
|
||||||
|
EISC.SetUshort(UCameraNumberSelect, 100);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EISC.SetUshort(UCameraNumberSelect, UInt16.Parse(cam));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Turns the
|
/// Turns the
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -184,8 +184,14 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
/// 661
|
/// 661
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceTypeJoinStart = 661;
|
public const uint SourceTypeJoinStart = 661;
|
||||||
|
/// <summary>
|
||||||
|
/// 761
|
||||||
|
/// </summary>
|
||||||
|
public const uint CameraNearNameStart = 761;
|
||||||
|
/// <summary>
|
||||||
|
/// 770 - presence of this name on the input will cause the camera to be added
|
||||||
|
/// </summary>
|
||||||
|
public const uint CameraFarName = 770;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -525,7 +531,7 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
newSl.Add("Source-None", codecOsd);
|
newSl.Add("Source-None", codecOsd);
|
||||||
}
|
}
|
||||||
// add sources...
|
// add sources...
|
||||||
for (uint i = 0; i<= 19; i++)
|
for (uint i = 0; i <= 19; i++)
|
||||||
{
|
{
|
||||||
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
|
var name = EISC.StringOutput[StringJoin.SourceNameJoinStart + i].StringValue;
|
||||||
if(string.IsNullOrEmpty(name))
|
if(string.IsNullOrEmpty(name))
|
||||||
@@ -622,9 +628,36 @@ namespace PepperDash.Essentials.Room.Cotija
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// cameras
|
||||||
|
var camsProps = new List<object>();
|
||||||
|
for (uint i = 0; i < 9; i++)
|
||||||
|
{
|
||||||
|
var name = EISC.GetString(i + StringJoin.CameraNearNameStart);
|
||||||
|
if (!string.IsNullOrEmpty(name))
|
||||||
|
{
|
||||||
|
camsProps.Add(new
|
||||||
|
{
|
||||||
|
name = name,
|
||||||
|
selector = "camera" + (i + 1),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var farName = EISC.GetString(StringJoin.CameraFarName);
|
||||||
|
if (!string.IsNullOrEmpty(farName))
|
||||||
|
{
|
||||||
|
camsProps.Add(new
|
||||||
|
{
|
||||||
|
name = farName,
|
||||||
|
selector = "cameraFar",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var props = new
|
var props = new
|
||||||
{
|
{
|
||||||
favorites = favs
|
favorites = favs,
|
||||||
|
cameras = camsProps,
|
||||||
};
|
};
|
||||||
var str = "videoCodec";
|
var str = "videoCodec";
|
||||||
var conf = new DeviceConfig()
|
var conf = new DeviceConfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user