Skip to content

Commit

Permalink
CameraControl: add setControlMode, setCaptureIntent
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-luxonis committed Oct 23, 2023
1 parent f59efaa commit 5858091
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake/Depthai/DepthaiDeviceSideConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "ae8f3bcc5e17f57c8686ada8e103587437a54570")
set(DEPTHAI_DEVICE_SIDE_COMMIT "7e834339d54869a99f7934aa952a6892323341e8")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")
14 changes: 14 additions & 0 deletions include/depthai/pipeline/datatype/CameraControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class CameraControl : public Buffer {
using AutoWhiteBalanceMode = RawCameraControl::AutoWhiteBalanceMode;
using SceneMode = RawCameraControl::SceneMode;
using EffectMode = RawCameraControl::EffectMode;
using ControlMode = RawCameraControl::ControlMode;
using CaptureIntent = RawCameraControl::CaptureIntent;
using FrameSyncMode = RawCameraControl::FrameSyncMode;

/// Construct CameraControl message
Expand Down Expand Up @@ -254,6 +256,18 @@ class CameraControl : public Buffer {
*/
CameraControl& setEffectMode(EffectMode mode);

/**
* Set a command to specify control mode
* @param mode Control mode
*/
CameraControl& setControlMode(ControlMode mode);

/**
* Set a command to specify capture intent mode
* @param mode Capture intent mode
*/
CameraControl& setCaptureIntent(CaptureIntent mode);

// Functions to retrieve properties
/**
* Check whether command to capture a still is set
Expand Down
2 changes: 1 addition & 1 deletion shared/depthai-shared
10 changes: 10 additions & 0 deletions src/pipeline/datatype/CameraControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ CameraControl& CameraControl::setEffectMode(EffectMode mode) {
cfg.effectMode = mode;
return *this;
}
CameraControl& CameraControl::setControlMode(ControlMode mode) {
cfg.setCommand(RawCameraControl::Command::CONTROL_MODE);
cfg.controlMode = mode;
return *this;
}
CameraControl& CameraControl::setCaptureIntent(CaptureIntent mode) {
cfg.setCommand(RawCameraControl::Command::CAPTURE_INTENT);
cfg.captureIntent = mode;
return *this;
}

bool CameraControl::getCaptureStill() const {
return cfg.getCommand(RawCameraControl::Command::STILL_CAPTURE);
Expand Down

0 comments on commit 5858091

Please sign in to comment.