mirror of
https://github.com/gtalent/sc9k.git
synced 2025-01-23 00:33:36 -06:00
Remove some commented out code
This commit is contained in:
parent
87997e8f18
commit
77df4257c5
@ -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() {
|
void CameraClient::setBaseUrl() {
|
||||||
auto const [host, port] = getCameraConnectionData();
|
auto const [host, port] = getCameraConnectionData();
|
||||||
m_baseUrl = QString("http://%1:%2").arg(host, QString::number(port));
|
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) {
|
void CameraClient::get(QString const&urlExt) {
|
||||||
QUrl url(QString(m_baseUrl) + urlExt);
|
QUrl url(QString(m_baseUrl) + urlExt);
|
||||||
QNetworkRequest rqst(url);
|
QNetworkRequest rqst(url);
|
||||||
|
@ -41,8 +41,6 @@ class CameraClient: public QObject {
|
|||||||
void setBaseUrl();
|
void setBaseUrl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void processVideoConfig(QNetworkReply*);
|
|
||||||
|
|
||||||
void get(QString const&url);
|
void get(QString const&url);
|
||||||
|
|
||||||
void poll();
|
void poll();
|
||||||
|
Loading…
Reference in New Issue
Block a user