-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathkivytello.kv
68 lines (62 loc) · 1.91 KB
/
kivytello.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
#: import Joystick joystick
<Button,ToggleButton>:
background_color: 0.0, 0.0, 0.0, 0.2
<DragableJoystick>
<CoverVideo>
<JoystickPanel@BoxLayout>
orientation: 'vertical'
size_hint_x: 0.3
# Label:
# id: label
DragableJoystick:
id: stick
size_hint_y: None
height: self.width
sticky: False
outer_size: 1.0
inner_size: 1.0
pad_size: 0.3
outer_background_color: (0.0, 0.0, 0.0, 0.1)
outer_line_color: (1.0, 1.0, 1.0, 1.0)
inner_background_color: (0.0, 0.0, 0.0, 0.1)
inner_line_color: (1.0, 1.0, 1.0, 1.0)
pad_background_color: (0.0, 0.0, 0.0, 0.1)
pad_line_color: (1.0, 1.0, 1.0, 1.0)
outer_line_width: 0.005
inner_line_width: 0.005
pad_line_width: 0.005
<KivyTelloRoot>:
CoverVideo:
source: 'http://127.0.0.1:30660/video_feed'
state: 'play'
#allow_stretch: True
options: {'eos': 'loop'}
BoxLayout:
orientation: 'vertical'
BoxLayout:
size_hint: 1, 0.1
orientation: 'horizontal'
Button:
id: quit
text: 'QUIT'
ToggleButton:
id: takeoff
text: 'TAKEOFF' if self.state == 'normal' else 'LAND'
ToggleButton:
id: rotcw
text: 'START CW' if self.state == 'normal' else 'STOP CW'
ToggleButton:
id: rotccw
text: 'START CCW' if self.state == 'normal' else 'STOP CCW'
ToggleButton:
id: facedetect
text: 'START FD' if self.state == 'normal' else 'STOP FD'
BoxLayout:
orientation: 'horizontal'
JoystickPanel:
id: pad_left
Widget:
size_hint_x: 0.4
JoystickPanel:
id: pad_right
# KivyTelloRoot: