From 77df4257c51bd2c08d173eeacae608073ea6824d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 24 Jul 2023 23:36:56 -0500 Subject: [PATCH] Remove some commented out code --- src/cameraclient.cpp | 39 --------------------------------------- src/cameraclient.hpp | 2 -- 2 files changed, 41 deletions(-) diff --git a/src/cameraclient.cpp b/src/cameraclient.cpp index 482701c..83b728b 100644 --- a/src/cameraclient.cpp +++ b/src/cameraclient.cpp @@ -63,50 +63,11 @@ void CameraClient::setHue(int val) { } } -/* -void CameraClient::getVideoConfig() { - QUrl url(QString(m_baseUrl) + "/cgi-bin/param.cgi?get_image_conf"); - QNetworkRequest rqst(url); - auto const reply = m_nam->get(rqst); - connect(reply, &QIODevice::readyRead, this, [this, reply] {processVideoConfig(reply);}); -} -*/ - void CameraClient::setBaseUrl() { auto const [host, port] = getCameraConnectionData(); m_baseUrl = QString("http://%1:%2").arg(host, QString::number(port)); } -/* -void CameraClient::processVideoConfig(QNetworkReply *reply) { - auto constexpr brightStart = std::string_view("bright = "); - auto constexpr saturationStart = std::string_view("saturation = "); - auto constexpr contrastStart = std::string_view("contrast = "); - auto constexpr sharpnessStart = std::string_view("sharpness = "); - auto constexpr hueStart = std::string_view("hue = "); - while (!reply->atEnd()) { - auto const line = reply->readLine(); - if (line.startsWith(brightStart)) { - m_videoConfig.brightness = QString(line.mid(brightStart.size())).toInt(); - } else if (line.startsWith(saturationStart)) { - m_videoConfig.saturation = QString(line.mid(saturationStart.size())).toInt(); - } else if (line.startsWith(contrastStart)) { - m_videoConfig.contrast = QString(line.mid(contrastStart.size())).toInt(); - } else if (line.startsWith(sharpnessStart)) { - m_videoConfig.sharpness = QString(line.mid(sharpnessStart.size())).toInt(); - } else if (line.startsWith(hueStart)) { - m_videoConfig.hue = QString(line.mid(hueStart.size())).toInt(); - } - } - qDebug() << - "brightness:" << m_videoConfig.brightness << - "saturation:" << m_videoConfig.brightness << - "contrast:" << m_videoConfig.brightness << - "sharpness:" << m_videoConfig.brightness << - "hue:" << m_videoConfig.hue; -} -*/ - void CameraClient::get(QString const&urlExt) { QUrl url(QString(m_baseUrl) + urlExt); QNetworkRequest rqst(url); diff --git a/src/cameraclient.hpp b/src/cameraclient.hpp index 202dfed..f81d592 100644 --- a/src/cameraclient.hpp +++ b/src/cameraclient.hpp @@ -41,8 +41,6 @@ class CameraClient: public QObject { void setBaseUrl(); private: - void processVideoConfig(QNetworkReply*); - void get(QString const&url); void poll();