-
Notifications
You must be signed in to change notification settings - Fork 0
/
HardwareSensor.qml
81 lines (66 loc) · 2.05 KB
/
HardwareSensor.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
Item {
property string title
property var sensor
property int fieldMinWidth: 145
property int lblTopMargin: 8
Layout.fillWidth: true
height: 143
Label {
id: titleText
text: title
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: lblTopMargin
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.bold: true
}
GridLayout {
anchors.top: titleText.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.topMargin: 2
columns: 2
TextFieldExt {
id: fieldPin
minWidth: fieldMinWidth
label: qsTr("Pin")
tooltip: qsTr("Teensy (actual) pin number (must support Analog/ADC).")
text: sensor.pin
target: sensor
property: "pin"
}
TextFieldExt {
id: fieldSeriesR
minWidth: fieldMinWidth
label: qsTr("Series Resistor (Ohm)")
tooltip: qsTr("Series resistor used to pull-up thermistor, adjust this to calibrate reading.")
text: sensor.seriesR
target: sensor
property: "seriesR"
}
TextFieldExt {
id: fieldNominalR
minWidth: fieldMinWidth
label: qsTr("Thermistor Nominal Resistance (Ohm)")
tooltip: qsTr("Thermistor resistance, usually 10000 (for 10K thermistor).")
text: sensor.nominalR
target: sensor
property: "nominalR"
}
TextFieldExt {
id: fieldBeta
minWidth: fieldMinWidth
label: qsTr("Thermistor Beta Coefficient")
tooltip: qsTr("Thermistor Beta coefficient, usually between 3000-4000.")
text: sensor.beta
target: sensor
property: "beta"
}
}
}