Skip to content

Commit

Permalink
fix ir calculation (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serafadam authored Jan 7, 2025
1 parent fe5285a commit 55739e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions depthai_ros_driver/src/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ rcl_interfaces::msg::SetParametersResult Camera::parameterCB(const std::vector<r
if(p.get_name() == ph->getFullParamName("i_laser_dot_brightness")) {
float laserdotBrightness = float(p.get_value<int>());
if(laserdotBrightness > 1.0) {
laserdotBrightness = 1200.0 / laserdotBrightness;
laserdotBrightness = laserdotBrightness / 1200.0;
}
device->setIrLaserDotProjectorIntensity(laserdotBrightness);
} else if(p.get_name() == ph->getFullParamName("i_floodlight_brightness")) {
float floodlightBrightness = float(p.get_value<int>());
if(floodlightBrightness > 1.0) {
floodlightBrightness = 1500.0 / floodlightBrightness;
floodlightBrightness = floodlightBrightness / 1500.0;
}
device->setIrFloodLightIntensity(floodlightBrightness);
}
Expand Down

0 comments on commit 55739e2

Please sign in to comment.