Skip to content

Commit

Permalink
fixed set ir mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
jian-dong committed Sep 13, 2023
1 parent 105562b commit c824bfa
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions orbbec_camera/src/ros_service.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*******************************************************************************
* Copyright (c) 2023 Orbbec 3D Technology, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
* Copyright (c) 2023 Orbbec 3D Technology, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/

#include "orbbec_camera/ob_camera_node.h"
#include <rclcpp/rclcpp.hpp>
Expand Down Expand Up @@ -156,7 +156,7 @@ void OBCameraNode::setupCameraCtrlServices() {
});
switch_ir_camera_srv_ = node_->create_service<SetString>(
"switch_ir", [this](const std::shared_ptr<SetString::Request> request,
std::shared_ptr<SetString::Response> response) {
std::shared_ptr<SetString::Response> response) {
switchIRCameraCallback(request, response);
});
}
Expand Down Expand Up @@ -462,7 +462,6 @@ void OBCameraNode::getExposureCallback(const std::shared_ptr<GetInt32::Request>&
auto stream = stream_index.first;
try {
switch (stream) {
case OB_STREAM_IR_LEFT:
case OB_STREAM_IR_RIGHT:
case OB_STREAM_IR:
response->data = device_->getIntProperty(OB_PROP_IR_EXPOSURE_INT);
Expand Down Expand Up @@ -545,8 +544,9 @@ void OBCameraNode::setMirrorCallback(const std::shared_ptr<SetBool::Request>& re
auto stream = stream_index.first;
try {
switch (stream) {
case OB_STREAM_IR_LEFT:
case OB_STREAM_IR_RIGHT:
device_->setBoolProperty(OB_PROP_IR_RIGHT_MIRROR_BOOL, request->data);
case OB_STREAM_IR_LEFT:
case OB_STREAM_IR:
device_->setBoolProperty(OB_PROP_IR_MIRROR_BOOL, request->data);
break;
Expand Down

0 comments on commit c824bfa

Please sign in to comment.