-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay.kv
298 lines (290 loc) · 8.27 KB
/
display.kv
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
#:import Gauge gauge
#:import Bar bar
#:import NoTransition kivy.uix.screenmanager.NoTransition
<Connected>:
<Widget>:
font_size: '20sp'
<Tow>:
_force_gauge: force_gauge
_battery_bar: battery_bar
_rpm_label: rpm_label
_rope_speed_label: rope_speed_label
_force_label: force_label
_connected_color: connected_color
name: 'tow'
BoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgba: 0,0,0,1
Rectangle:
pos: self.pos
size: self.size
RelativeLayout:
size_hint: 1, .9
Gauge:
id: force_gauge
size_hint: 1, 1
Label:
size_hint: .2, .2
pos_hint: {'top': 1, 'right': 1}
markup: True
halign: 'right'
font_name: 'fonts/DejaVuSans-Bold.ttf'
id: rpm_label
text: '[size=50]5000[/size]\n[font=Roboto]1/min[/font]'
Label:
size_hint: .2, .2
pos_hint: {'top': 1, 'x': 0}
markup: True
font_name: 'fonts/DejaVuSans-Bold.ttf'
id: rope_speed_label
text: '[size=50]32.3[/size]\n[font=Roboto]km/h[/font]'
BoxLayout:
size_hint: 1, .1
Connected:
id: connected_color
size_hint: None, 1
width: self.height
Button:
size_hint: .2, 1
text: 'Batterie'
on_release: app.root.current = 'battery'
Bar:
size_hint: .6, 1
id: battery_bar
background_color: [.29, .29, .29, 1]
color: [0, 1, 0, 1]
Label:
size_hint: .1, 1
id: force_label
text: '0kg'
<ForceSelect>:
name: 'forceselect'
_max_force_select: max_force_select
_force_select_display: force_select_display
BoxLayout:
orientation: 'vertical'
spacing: 10
canvas.before:
Color:
rgba: 0,0,0,1
Rectangle:
pos: self.pos
size: self.size
Label:
text: 'Zugkraft Auswahl'
Label:
id: force_select_display
text: '50 kg'
BoxLayout:
Slider:
id: max_force_select
size_hint: .8, None
min: 60
max: 100
step: 5
on_value: root.select_force(self.value)
BoxLayout:
orientation: 'vertical'
size_hint: .2, None
Label:
text: 'Biplace'
Switch:
id: biplace
on_active: root.biplace(self.active)
Button:
text: 'Ok'
on_release: app.root.current = 'tow'
<Service>:
name: 'service'
_motor_temperature: temperature_motor_label
_controller_temperature: temperature_controller_label
_charge_level: charge_level_label
_min_voltage: min_voltage_label
_min_cell_address: min_cell_address_label
BoxLayout:
orientation: 'vertical'
spacing: 0
canvas.before:
Color:
rgba: 0,0,0,1
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
size_hint: 1, .18
Label:
text: 'Motor'
Label:
text: 'Temperatur'
Label:
id: temperature_motor_label
text: '--C'
BoxLayout:
size_hint: 1, .18
Label:
text: 'Controller'
Label:
text: 'Temperatur'
Label:
id: temperature_controller_label
text: '--C'
BoxLayout:
size_hint: 1, .54
Label:
size_hint: .33, 1
text: 'Batterie'
BoxLayout:
size_hint: .67, 1
orientation: 'vertical'
BoxLayout:
Label:
text: 'Ladezustand'
Label:
id: charge_level_label
text: '--,-%'
BoxLayout:
Label:
text: 'kleinste Spannung'
Label:
id: min_voltage_label
text: '-,--V'
BoxLayout:
Label:
text: 'Zelle'
Label:
id: min_cell_address_label
text: '--'
BoxLayout:
size_hint: 1, .1
spacing: 1
Button:
text: 'Schlepp'
on_release: app.root.current = 'tow'
Button:
text: 'Batterie'
on_release: app.root.current = 'battery'
Button:
text: 'Kalibrieren (FINGER WEG!)'
on_release: app.root.current = 'calibrate'
<Calibrate>:
name: 'calibrate'
_fifty_label: fifty_label
_sixty_label: sixty_label
_seventy_label: seventy_label
_eighty_label: eighty_label
_ninety_label: ninety_label
_hundret_label: hundret_label
_onethirty_label: onethirty_label
_force_measure_label: force_measure_label
BoxLayout:
spacing: 1
orientation: 'vertical'
canvas.before:
Color:
rgba: 0,0,0,1
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
Label:
text: '50kg'
Label:
text: '60kg'
Label:
text: '70kg'
Label:
text: '80kg'
Label:
text: '90kg'
Label:
text: '100kg'
Label:
text: '130kg'
BoxLayout:
Label:
id: fifty_label
markup: True
text: '0'
Label:
id: sixty_label
markup: True
text: '0'
Label:
id: seventy_label
markup: True
text: '0'
Label:
id: eighty_label
markup: True
text: '0'
Label:
id: ninety_label
markup: True
text: '0'
Label:
id: hundret_label
markup: True
text: '0'
Label:
id: onethirty_label
markup: True
text: '0'
BoxLayout:
Label:
text: 'Aktueller Messwert'
Label:
id: force_measure_label
text: '0'
BoxLayout:
Button:
text: '<'
on_press: root.previous_label()
Button:
text: 'Übernehmen'
on_press: root.take_over()
Button:
text: '>'
on_press: root.next_label()
Button:
text: 'Zurück'
on_release: app.root.current = 'service'
<Battery>:
name: 'battery'
_voltage: voltage
_level: level
BoxLayout:
orientation: 'vertical'
spacing: 0
canvas.before:
Color:
rgba: 0,0,0,1
Rectangle:
pos: self.pos
size: self.size
Label:
text: 'Batterie'
size_hint: 1, .3
font_size: '100sp'
Label:
id: voltage
text: '-,--Volt'
size_hint: 1, .3
font_size: '100sp'
color: [0,1,0,1]
Label:
id: level
text: '--,-%'
size_hint: 1, .3
font_size: '100sp'
color: [0,1,0,1]
BoxLayout:
size_hint: 1, .1
spacing: 1
Button:
text: 'Schlepp'
on_release: app.root.current = 'tow'
Button:
text: 'Service'
on_release: app.root.current = 'service'