diff --git a/src/icons/108x108/thermi2c.png b/src/icons/108x108/thermi2c.png
index ab10628..aa53946 100644
Binary files a/src/icons/108x108/thermi2c.png and b/src/icons/108x108/thermi2c.png differ
diff --git a/src/icons/128x128/thermi2c.png b/src/icons/128x128/thermi2c.png
index 54375c5..fb1d4da 100644
Binary files a/src/icons/128x128/thermi2c.png and b/src/icons/128x128/thermi2c.png differ
diff --git a/src/icons/150x151/logo.png b/src/icons/150x151/logo.png
new file mode 100644
index 0000000..1b814de
Binary files /dev/null and b/src/icons/150x151/logo.png differ
diff --git a/src/icons/172x172/thermi2c.png b/src/icons/172x172/thermi2c.png
index 36eee58..7aaaf28 100644
Binary files a/src/icons/172x172/thermi2c.png and b/src/icons/172x172/thermi2c.png differ
diff --git a/src/icons/86x86/thermi2c.png b/src/icons/86x86/thermi2c.png
index ad316d6..72a4998 100644
Binary files a/src/icons/86x86/thermi2c.png and b/src/icons/86x86/thermi2c.png differ
diff --git a/src/icons/logo.png b/src/icons/logo.png
new file mode 100644
index 0000000..1b814de
Binary files /dev/null and b/src/icons/logo.png differ
diff --git a/src/qml/pages/SecondPage.qml b/src/qml/pages/SecondPage.qml
index 6009e5a..18c09b1 100644
--- a/src/qml/pages/SecondPage.qml
+++ b/src/qml/pages/SecondPage.qml
@@ -30,8 +30,8 @@ Page {
TextField {
id: fpsPicker
width: parent.width - Theme.horizontalPageMargin * 2
- placeholderText: "Enter FPS limit(1-60)"
- validator: IntValidator { bottom: 1; top: 60 }
+ placeholderText: "Enter FPS limit(1-25)"
+ validator: IntValidator { bottom: 1; top: 25 }
onTextChanged: {
if (fpsPicker.acceptableInput) {
polling_timer.timeout = (1000/parseInt(text, 10))
@@ -42,7 +42,8 @@ Page {
SectionHeader { text: "Display" }
Label {
- text: "Min-Max Value"
+ id: lbl
+ text: "Smoothing factor: 0%"
anchors.left: parent.left
anchors.leftMargin: Theme.horizontalPageMargin
}
@@ -50,11 +51,12 @@ Page {
id: rangeSlider
width: parent.width - Theme.horizontalPageMargin * 2
stepSize: 1
- value: 50
- minimumValue: 0
- maximumValue: 100
+ value: 98
+ minimumValue: 50
+ maximumValue: 99
onValueChanged: {
- // handle value change
+ lbl.text = "Ignore factor: " + value.toString() + "%"
+ thermalRenderer.setIgnorePerc(value)
}
}
diff --git a/src/ressources.qrc b/src/ressources.qrc
new file mode 100644
index 0000000..48b1a6d
--- /dev/null
+++ b/src/ressources.qrc
@@ -0,0 +1,5 @@
+
+
+ icons/logo.png
+
+
diff --git a/src/thermaldatarenderer.cpp b/src/thermaldatarenderer.cpp
index c7d2b11..e740edb 100644
--- a/src/thermaldatarenderer.cpp
+++ b/src/thermaldatarenderer.cpp
@@ -17,8 +17,8 @@ void ThermalDataRenderer::receiveNewData(QVector data) {
QVector sortedData = data;
std::sort(sortedData.begin(), sortedData.end());
- const float lowerPercentile = 0.2f;
- const float upperPercentile = 0.98f;
+ const float lowerPercentile = lp/100.0f;
+ const float upperPercentile = hp/100.0f;
int lowerIndex = static_cast(lowerPercentile * sortedData.size());
int upperIndex = static_cast(upperPercentile * sortedData.size());
diff --git a/src/thermaldatarenderer.h b/src/thermaldatarenderer.h
index f08d889..5bf3c80 100644
--- a/src/thermaldatarenderer.h
+++ b/src/thermaldatarenderer.h
@@ -23,6 +23,8 @@ class ThermalDataRenderer : public QObject
float minValue = 0.0f;
float maxValue = 1.0f;
bool takeCapture = false;
+ unsigned int hp = 98;
+ unsigned int lp = 2;
public:
Q_PROPERTY(QVector> attributers READ getAttributers NOTIFY attributersChanged)
Q_PROPERTY(QStringList attributerNames READ getAttributerNames NOTIFY attributerNamesChanged)
@@ -35,6 +37,11 @@ public:
return names;
}
+ Q_INVOKABLE void setIgnorePerc(const int& i){
+ lp = i;
+ hp = 100-i;
+ }
+
QThread workerThread;
ThermalDataRenderer() : renderBuffer(768){}
Q_INVOKABLE QColor getDataForIndex(const int& index){
diff --git a/src/thermi2c.pro b/src/thermi2c.pro
index 9807592..5f61e83 100644
--- a/src/thermi2c.pro
+++ b/src/thermi2c.pro
@@ -62,3 +62,6 @@ HEADERS += \
src/i2cdriversingleton.h \
src/i2cif.h \
thermaldatarenderer.h
+
+RESOURCES += \
+ ressources.qrc
diff --git a/src/thermi2c.pro.user b/src/thermi2c.pro.user
index bad8f72..fecd75a 100644
--- a/src/thermi2c.pro.user
+++ b/src/thermi2c.pro.user
@@ -1,6 +1,6 @@
-
+
EnvironmentId