Skip to content

Correct PTZ sample direction arguments#173

Open
alafleur-genetec wants to merge 1 commit intomainfrom
ptz-media-sample-directions
Open

Correct PTZ sample direction arguments#173
alafleur-genetec wants to merge 1 commit intomainfrom
ptz-media-sample-directions

Conversation

@alafleur-genetec
Copy link
Copy Markdown
Member

Summary

  • correct the PtzCoordinatesManagerSample zoom direction comment and example
  • correct the iris and focus direction comments and examples to match the SDK PTZ contract
  • keep the change isolated to the Media SDK sample

Validation

  • traced the PTZ contract through Security Center source
  • no automated tests run (sample and documentation only change)

@alafleur-genetec alafleur-genetec changed the title docs: correct PTZ sample direction arguments Correct PTZ sample direction arguments Apr 14, 2026
@alafleur-genetec alafleur-genetec self-assigned this Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Media SDK PtzCoordinatesManagerSample to align the zoom/iris/focus direction comments and example arguments with the SDK PTZ contract.

Changes:

  • Corrected StartZoom direction comment and updated the example argument value.
  • Corrected StartIris direction comment and updated the example argument value.
  • Corrected StartFocus direction comment and updated the example argument value.
Comments suppressed due to low confidence (2)

Samples/Media SDK/PtzCoordinatesManagerSample/PtzCoordinatesManagerSample.cs:172

  • These ControlPtz calls mix a named argument (commandType:) with subsequent positional arguments, which is not valid C# (positional arguments cannot follow named ones). Use either fully positional arguments or name arg1:/arg2: as well; also consider applying the same fix to the corresponding StopZoom call for consistency/compilation.
            // arg1: Zoom direction (0 for zoom in, 1 for zoom out)
            // arg2: Zoom speed (0 to 100)
            manager.ControlPtz(commandType: PtzCommandType.StartZoom, 0, 50);

            await Task.Delay(2000, token); // Wait for 2 seconds before stopping zoom

            manager.ControlPtz(commandType: PtzCommandType.StopZoom, 0, 0);

Samples/Media SDK/PtzCoordinatesManagerSample/PtzCoordinatesManagerSample.cs:187

  • These ControlPtz calls mix a named argument (commandType:) with subsequent positional arguments, which will not compile in C#. Switch to either fully positional arguments or name arg1:/arg2: as well (and align the corresponding StopIris call too).
            // arg1: Iris direction (0 for open iris, 1 for close iris)
            // arg2: Iris adjustment speed (0 to 100)
            manager.ControlPtz(commandType: PtzCommandType.StartIris, 0, 50);

            await Task.Delay(2000, token); // Wait for 2 seconds before stopping iris

            manager.ControlPtz(commandType: PtzCommandType.StopIris, 0, 0);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants