Commit 93b96d94 authored by Philipp Auersperg's avatar Philipp Auersperg
Browse files

camera als layer unter den controls

Showing with 65 additions and 64 deletions
+65 -64
......@@ -6,6 +6,7 @@ import numpy as np
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.camera import Camera
from kivy.uix.togglebutton import ToggleButton
......@@ -89,77 +90,77 @@ try:
# btn_lifeview:btn_lifeview
# camera:camera
BoxLayout:
orientation:'vertical'
size_hint:.9,1
BoxLayout:
orientation:'horizontal'
size_hint:1,None
height:distance.height*2
padding_left:sp(20),0
MDNumberInput:
id:distance
textsize:20
value:4
step:.05
helper_text:'distance'
# helper_text_mode:'persistent'
MDLabel:
id:accel_info
text:root.accel_fmt
id:camera_space
size_hint:1,1
size:root.size
pos:root.pos
BoxLayout:
orientation:'horizontal'
size: root.size
pos:root.pos
BoxLayout:
orientation:'vertical'
size_hint:1,1
BoxLayout:
id:camera_space
size_hint:1,1
size_hint:.9,1
BoxLayout:
orientation:'horizontal'
size_hint:1,None
height:distance.height*2
padding_left:sp(20),0
MDNumberInput:
id:distance
textsize:20
value:4
step:.05
helper_text:'distance'
# helper_text_mode:'persistent'
MDLabel:
id:accel_info
text:root.accel_fmt
BoxLayout:
orientation:'vertical'
size_hint:1,1
BoxLayout:
size_hint:None,None
orientation:'vertical'
padding:dp(15)
MDSwitch:
text:'asdasd'
size_hint:None,None
size: sp(48), dp(20)
id:switch_camera
on_press: print self.active
MDLabel:
size_hint:None,None
height:dp(20)
text: 'Life view'
BoxLayout:
size_hint:None,None
orientation:'vertical'
padding:dp(15)
MDSwitch:
size_hint:1,None
BoxLayout:
size_hint:None,None
size:sp(48),dp(20)
id:switch_gps
MDLabel:
orientation:'vertical'
padding:dp(15)
MDSwitch:
text:'asdasd'
size_hint:None,None
size: sp(48), dp(20)
id:switch_camera
on_press: print self.active
MDLabel:
size_hint:None,None
height:dp(20)
text: 'Life view'
BoxLayout:
size_hint:None,None
height:dp(20)
text:'gps'
# MDNumberInput:
# id:fov
# value:root.camera_fov #0.9257
# step:0.001
Label:
id:gps_pos
text:str(root.gps_position)
height:'48dp'
size_hint:.2,None
# Button:
# text:'cal.'
# on_release:root.on_calibrate_accel()
orientation:'vertical'
padding:dp(15)
MDSwitch:
size_hint:None,None
size:sp(48),dp(20)
id:switch_gps
MDLabel:
size_hint:None,None
height:dp(20)
text:'gps'
Label:
id:gps_pos
text:str(root.gps_position)
height:'48dp'
size_hint:.2,None
MDRaisedButton:
size_hint:.1,1
text: 'Capture'
# height: '48dp'
on_press: root.capture()
MDRaisedButton:
size_hint:.1,1
text: 'Capture'
# height: '48dp'
on_press: root.capture()
''')
except:
......@@ -167,7 +168,7 @@ except:
raise
class CameraClick(BoxLayout):
class CameraClick(FloatLayout):
target_dir = StringProperty(".")
gps_active = BooleanProperty(False)
gps_position = ObjectProperty((0,0))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment