Skip to content

Commit

Permalink
feature: adds preset save FB join 30
Browse files Browse the repository at this point in the history
fature: adds api document
  • Loading branch information
jtalborough committed Jan 19, 2023
1 parent 8ddfceb commit 400f439
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
Binary file added HDIntegratedCamera_InterfaceSpecifications-E.pdf
Binary file not shown.
25 changes: 24 additions & 1 deletion PanasonicCameraEpi/PanasonicCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Core;
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
using Crestron.SimplSharp;


namespace PanasonicCameraEpi
{
Expand All @@ -30,7 +32,23 @@ public class PanasonicCamera : ReconfigurableDevice, IBridgeAdvanced, IHasCamera
public BoolFeedback IsOnlineFeedback { get { return _monitor.IsOnlineFeedback; } }
public IntFeedback PanSpeedFeedback { get; private set; }
public IntFeedback ZoomSpeedFeedback { get; private set; }
public IntFeedback TiltSpeedFeedback { get; private set; }
public IntFeedback TiltSpeedFeedback { get; private set; }
public BoolFeedback PresetSavedFeedback { get; private set; }
public bool PresetSavedBool
{
get
{
return _PresetSavedBool;
}
set
{
_PresetSavedBool = value;
PresetSavedFeedback.FireUpdate();
}


}
private bool _PresetSavedBool { get; set; }

public PanasonicCamera(IBasicCommunication comms, DeviceConfig config)
: base(config)
Expand Down Expand Up @@ -138,6 +156,7 @@ private void SetupFeedbacks()
PanSpeedFeedback = new IntFeedback(() => PanSpeed);
TiltSpeedFeedback = new IntFeedback(() => TiltSpeed);
ZoomSpeedFeedback = new IntFeedback(() => ZoomSpeed);
PresetSavedFeedback = new BoolFeedback(() => PresetSavedBool);

PanSpeedFeedback.FireUpdate();
TiltSpeedFeedback.FireUpdate();
Expand Down Expand Up @@ -285,6 +304,8 @@ public void RecallPreset(int preset)
public void SavePreset(int preset)
{
_queue.EnqueueCmd(_cmd.PresetSaveCommand(preset));
PresetSavedBool = true;
new CTimer( (o) => PresetSavedBool = false, 5000);
}

/// <summary>
Expand Down Expand Up @@ -373,6 +394,8 @@ public void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, E
NameFeedback.LinkInputSig(trilist.StringInput[joinMap.DeviceName.JoinNumber]);

NumberOfPresetsFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfPresets.JoinNumber]);

PresetSavedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PresetSavedFeedback.JoinNumber]);

CameraIsOffFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PowerOff.JoinNumber]);
CameraIsOffFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.PowerOn.JoinNumber]);
Expand Down
17 changes: 17 additions & 0 deletions PanasonicCameraEpi/PanasonicCameraBridgeJoinMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,23 @@ public class PanasonicCameraBridgeJoinMap : JoinMapBaseAdvanced
JoinType = eJoinType.Digital
});

/// <summary>
/// Camera preset saved
/// </summary>
[JoinName("PresetSavedFeedback")]
public JoinDataComplete PresetSavedFeedback = new JoinDataComplete(
new JoinData
{
JoinNumber = 30,
JoinSpan = 1
},
new JoinMetadata
{
Description = "Camera preset saved Feedback",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});

/// <summary>
/// Camera preset save
/// </summary>
Expand Down

0 comments on commit 400f439

Please sign in to comment.