Remove some commented out code

This commit is contained in:
Gary Talent 2023-07-24 23:36:56 -05:00
parent 87997e8f18
commit 77df4257c5
2 changed files with 0 additions and 41 deletions

View File

@ -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);

View File

@ -41,8 +41,6 @@ class CameraClient: public QObject {
void setBaseUrl();
private:
void processVideoConfig(QNetworkReply*);
void get(QString const&url);
void poll();