diff --git a/applications/gui/src/camera.cpp b/applications/gui/src/camera.cpp index dd8bc936a6e06ac7a15e2951a053eeadb783b43f..fe7b115c779989468644014675b020e1a0ed7d52 100644 --- a/applications/gui/src/camera.cpp +++ b/applications/gui/src/camera.cpp @@ -18,7 +18,7 @@ private: float n_; // total number of samples public: - StatisticsImage(cv::Size size); + explicit StatisticsImage(cv::Size size); StatisticsImage(cv::Size size, float max_f); /* @brief reset all statistics to 0 diff --git a/applications/gui/src/camera.hpp b/applications/gui/src/camera.hpp index 605560cc0cae859678e25dbf2070d777a72e9112..0d6e99b6d08d5cd5f71dfc20a94d0f35e26518b0 100644 --- a/applications/gui/src/camera.hpp +++ b/applications/gui/src/camera.hpp @@ -19,6 +19,8 @@ class Camera { Camera(ftl::gui::Screen *screen, ftl::rgbd::Source *src); ~Camera(); + Camera(const Camera &)=delete; + ftl::rgbd::Source *source(); int width() { return (src_) ? src_->parameters().width : 0; } diff --git a/applications/gui/src/media_panel.hpp b/applications/gui/src/media_panel.hpp index d7f9aa9938ee51418629ee42781e738b535c38d0..9e9154d860483a6bf6c88b8da856a4a89862de2f 100644 --- a/applications/gui/src/media_panel.hpp +++ b/applications/gui/src/media_panel.hpp @@ -15,7 +15,7 @@ class Screen; class MediaPanel : public nanogui::Window { public: - MediaPanel(ftl::gui::Screen *); + explicit MediaPanel(ftl::gui::Screen *); ~MediaPanel(); void cameraChanged(); diff --git a/applications/gui/src/screen.cpp b/applications/gui/src/screen.cpp index 56624ce61d9524c43e6dffe00948e807528ae595..22382626d15ffe037020fd8545772cbd506905e8 100644 --- a/applications/gui/src/screen.cpp +++ b/applications/gui/src/screen.cpp @@ -51,15 +51,15 @@ namespace { })"; } -ftl::gui::Screen::Screen(ftl::Configurable *proot, ftl::net::Universe *pnet, ftl::ctrl::Master *controller) : nanogui::Screen(Eigen::Vector2i(1024, 768), "FT-Lab Remote Presence") { +ftl::gui::Screen::Screen(ftl::Configurable *proot, ftl::net::Universe *pnet, ftl::ctrl::Master *controller) : + nanogui::Screen(Eigen::Vector2i(1024, 768), "FT-Lab Remote Presence"), + status_("FT-Lab Remote Presence System") { using namespace nanogui; net_ = pnet; ctrl_ = controller; root_ = proot; camera_ = nullptr; - status_ = "FT-Lab Remote Presence System"; - setSize(Vector2i(1280,720)); toolbuttheme = new Theme(*theme()); diff --git a/applications/gui/src/src_window.hpp b/applications/gui/src/src_window.hpp index 7f28279c7fa3cd83bdb62a074e55d4d549799f73..b2fe8a9e0957f3345a719a0c37bac46bf473089c 100644 --- a/applications/gui/src/src_window.hpp +++ b/applications/gui/src/src_window.hpp @@ -22,7 +22,7 @@ class Camera; class SourceWindow : public nanogui::Window { public: - SourceWindow(ftl::gui::Screen *screen); + explicit SourceWindow(ftl::gui::Screen *screen); ~SourceWindow(); const std::vector<ftl::gui::Camera*> &getCameras(); diff --git a/components/common/cpp/src/timer.cpp b/components/common/cpp/src/timer.cpp index 252c51b8360c83756496fd8761ad7e017c394b06..328006ab82041d9613ab9ef7847d74727e3aa7f2 100644 --- a/components/common/cpp/src/timer.cpp +++ b/components/common/cpp/src/timer.cpp @@ -30,9 +30,10 @@ struct TimerJob { int id; function<bool(int64_t)> job; volatile bool active; - bool paused; - int multiplier; - int countdown; + // TODO: (Nick) Implement richer forms of timer + //bool paused; + //int multiplier; + //int countdown; std::string name; }; @@ -109,7 +110,7 @@ const TimerHandle ftl::timer::add(timerlevel_t l, const std::function<bool(int64 UNIQUE_LOCK(mtx, lk); int newid = last_id++; - jobs[l].push_back({newid, f, false, false, 0, 0, "NoName"}); + jobs[l].push_back({newid, f, false, "NoName"}); return TimerHandle(newid); } diff --git a/components/rgbd-sources/src/calibrate.cpp b/components/rgbd-sources/src/calibrate.cpp index df7fac455b68d8ee326957053ae99da946aa941f..934ca1dcd221ed725c06cba5b6c921b279456d26 100644 --- a/components/rgbd-sources/src/calibrate.cpp +++ b/components/rgbd-sources/src/calibrate.cpp @@ -150,8 +150,6 @@ bool Calibrate::_loadCalibration(cv::Size img_size, std::pair<Mat, Mat> &map1, s } void Calibrate::updateCalibration(const ftl::rgbd::Camera &p) { - std::pair<Mat, Mat> map1, map2; - Q_.at<double>(3, 2) = 1.0 / p.baseline; Q_.at<double>(2, 3) = p.fx; Q_.at<double>(0, 3) = p.cx; diff --git a/components/rgbd-sources/test/frame_unit.cpp b/components/rgbd-sources/test/frame_unit.cpp index 9f3c5b33eb450087959bb560f6c7ea15732a0581..1d1648b2139440f08c62379bffc6f2dec356112d 100644 --- a/components/rgbd-sources/test/frame_unit.cpp +++ b/components/rgbd-sources/test/frame_unit.cpp @@ -32,7 +32,7 @@ TEST_CASE("Frame::get()", "") { bool hadexception = false; try { - auto &m = f.get<cv::Mat>(Channel::Colour); + f.get<cv::Mat>(Channel::Colour); } catch (ftl::exception &e) { hadexception = true; } @@ -45,7 +45,7 @@ TEST_CASE("Frame::get()", "") { bool hadexception = false; try { - auto &m = f.get<cv::cuda::GpuMat>(Channel::Colour); + f.get<cv::cuda::GpuMat>(Channel::Colour); } catch (ftl::exception &e) { hadexception = true; } @@ -138,7 +138,7 @@ TEST_CASE("Frame::createTexture()", "") { bool hadexception = false; try { - auto &t = f.createTexture<float>(Channel::Depth); + f.createTexture<float>(Channel::Depth); } catch (ftl::exception &e) { hadexception = true; } @@ -169,7 +169,7 @@ TEST_CASE("Frame::createTexture()", "") { try { f.create<cv::Mat>(Channel::Depth, Format<uchar4>(100,100)); - auto &t = f.createTexture<float>(Channel::Depth); + f.createTexture<float>(Channel::Depth); } catch (ftl::exception &e) { hadexception = true; } @@ -228,7 +228,7 @@ TEST_CASE("Frame::getTexture()", "") { bool hadexception = false; try { - auto &t = f.getTexture<float>(Channel::Depth); + f.getTexture<float>(Channel::Depth); } catch (ftl::exception &e) { hadexception = true; } @@ -242,7 +242,7 @@ TEST_CASE("Frame::getTexture()", "") { try { f.createTexture<uchar4>(Channel::Depth, Format<uchar4>(100,100)); - auto &t = f.getTexture<float>(Channel::Depth); + f.getTexture<float>(Channel::Depth); } catch (ftl::exception &e) { hadexception = true; }