-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27748c6
commit 31d3be4
Showing
3 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
namespace VidiView.Api.DataModel; | ||
|
||
/// <summary> | ||
/// Execute a camera command | ||
/// </summary> | ||
public record CameraCommand | ||
{ | ||
/// <summary> | ||
/// Select a specific preset | ||
/// </summary> | ||
public Guid? PresetId { get; init; } | ||
|
||
/// <summary> | ||
/// Pan camera relative current position and visible area | ||
/// </summary> | ||
/// <remarks>Current position is 0.5, the left edge of the visible area is 0.0 and the right edge is 1.0</remarks> | ||
public double? PanRelative { get; init; } | ||
|
||
/// <summary> | ||
/// Pan camera to absolute position | ||
/// </summary> | ||
/// <remarks>Leftmost position of camera is 0.0 and rightmost 1.0</remarks> | ||
public double? PanAbsolute { get; init; } | ||
|
||
/// <summary> | ||
/// Tilt camera relative current position and visible area | ||
/// </summary> | ||
/// <remarks>Current position is 0.5, the top edge of the visible area is 1.0 and the bottom edge is 0.0</remarks> | ||
public double? TiltRelative { get; init; } | ||
|
||
/// <summary> | ||
/// Tilt camera to absolute position | ||
/// </summary> | ||
/// <remarks>Top position of camera is 1.0 and bottom is 0.0</remarks> | ||
public double? TiltAbsolute { get; init; } | ||
|
||
/// <summary> | ||
/// Set camera zoom to absolute value. | ||
/// </summary> | ||
/// <remarks>Minimum zoom is 0.0 (wide), and maximum supported zoom is 1.0 (tele)</remarks> | ||
public double? ZoomAbsolute { get; init; } | ||
|
||
/// <summary> | ||
/// Start/stop a pan/tilt/zoom operation | ||
/// </summary> | ||
public CameraDriveEnum? Drive { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace VidiView.Api.DataModel; | ||
|
||
[JsonConverter(typeof(StringEnumConverterEx<CameraDriveEnum>))] | ||
[Flags] | ||
public enum CameraDriveEnum | ||
{ | ||
None = 0x0, | ||
PanLeft = 0x1, | ||
PanRight = 0x2, | ||
TiltUp = 0x4, | ||
TiltDown = 0x8, | ||
ZoomWide = 0x16, // Zoom out | ||
ZoomTele = 0x32, // Zoom in | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters