Skip to content
Snippets Groups Projects
Commit 1a1b4359 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Allow remote enable disable of ilw

parent c6631d4f
No related branches found
No related tags found
2 merge requests!116Implements #133 point alignment,!114Ongoing #133 improvements
This commit is part of merge request !114. Comments created here will be created in the context of that merge request.
...@@ -14,7 +14,11 @@ using ftl::rgbd::Format; ...@@ -14,7 +14,11 @@ using ftl::rgbd::Format;
using cv::cuda::GpuMat; using cv::cuda::GpuMat;
ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) { ILW::ILW(nlohmann::json &config) : ftl::Configurable(config) {
enabled_ = value("ilw_align", true);
on("ilw_align", [this](const ftl::config::Event &e) {
enabled_ = value("ilw_align", true);
});
} }
ILW::~ILW() { ILW::~ILW() {
...@@ -22,6 +26,8 @@ ILW::~ILW() { ...@@ -22,6 +26,8 @@ ILW::~ILW() {
} }
bool ILW::process(ftl::rgbd::FrameSet &fs, cudaStream_t stream) { bool ILW::process(ftl::rgbd::FrameSet &fs, cudaStream_t stream) {
if (!enabled_) return false;
_phase0(fs, stream); _phase0(fs, stream);
//for (int i=0; i<2; ++i) { //for (int i=0; i<2; ++i) {
......
...@@ -59,6 +59,7 @@ class ILW : public ftl::Configurable { ...@@ -59,6 +59,7 @@ class ILW : public ftl::Configurable {
bool _phase2(ftl::rgbd::FrameSet &fs, float rate, cudaStream_t stream); bool _phase2(ftl::rgbd::FrameSet &fs, float rate, cudaStream_t stream);
std::vector<detail::ILWData> data_; std::vector<detail::ILWData> data_;
bool enabled_;
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment