summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Kostovsky <luntik2012@gmail.com>2025-01-26 19:15:00 +0100
committerNikita Kostovsky <luntik2012@gmail.com>2025-01-26 19:15:00 +0100
commit45de8a02dbf918605526a3886784bae741a3a545 (patch)
tree1ba37b6ed311d234709ebab3ac5b54543a4643f7
parentbe8db2ba14898628598c5c189327c7530679f9f1 (diff)
add gain control, laser level (strobe span) control
-rw-r--r--Main.qml27
-rw-r--r--main.cpp4
2 files changed, 25 insertions, 6 deletions
diff --git a/Main.qml b/Main.qml
index 606998f..7d26c9d 100644
--- a/Main.qml
+++ b/Main.qml
@@ -105,6 +105,7 @@ ApplicationWindow {
json["aeEnable"] = enableAutoExposureCheckbox.checked;
json["exposureTime"] = exposureTimeSpinBox.value;
json["laserLevel"] = laserLevelSpinBox.value;
+ json["gain"] = gainSpinBox.value;
console.log(JSON.stringify(json));
XHR.sendRequest("POST", url, function(response) {
@@ -296,7 +297,7 @@ ApplicationWindow {
Layout.fillWidth: true
from: 10
- to: 30000
+ to: 30000000
stepSize: 100
editable: true
@@ -313,12 +314,30 @@ ApplicationWindow {
Layout.fillWidth: true
- from: 500
+ from: 0
to: 50000
- stepSize: 250
+ stepSize: 1
editable: true
- value: 1500
+ value: 3
+ onValueChanged: writeParams()
+ }
+
+ Label {
+ text: qsTr("Gain [1,254]:")
+ }
+
+ SpinBox {
+ id: gainSpinBox
+
+ Layout.fillWidth: true
+
+ from: 0
+ to: 254
+ stepSize: 1
+ editable: true
+
+ value: 3
onValueChanged: writeParams()
}
diff --git a/main.cpp b/main.cpp
index 9a11473..bd45479 100644
--- a/main.cpp
+++ b/main.cpp
@@ -92,7 +92,7 @@ int main(
}
if (reply->url().toString().endsWith("pixels")) {
- qDebug() << "got pixels";
+ // qDebug() << "got pixels";
auto json = QJsonDocument::fromJson(reply->readAll()).object();
auto jsonPixels = json["pixels"].toArray();
auto encoderPosition = json["encoderPosition"].toInteger();
@@ -195,7 +195,7 @@ int main(
prev_y_profile = y_pixels;
} else if (reply->url().toString().endsWith("profile")) {
- qDebug() << "got profile";
+ // qDebug() << "got profile";
auto json = QJsonDocument::fromJson(reply->readAll()).object();
auto jsonProfile = json["profile"].toObject();
auto jsonPointsMm = jsonProfile["pointsMm"].toArray();