bugfix
This commit is contained in:
parent
7fdbf8bc76
commit
2ef23120a6
@ -35,6 +35,9 @@ class CustomCamera(XCamera):
|
|||||||
if self.isAndroid:
|
if self.isAndroid:
|
||||||
self.angle = -90
|
self.angle = -90
|
||||||
|
|
||||||
|
def set_angle(self, angle):
|
||||||
|
self.angle = -90
|
||||||
|
|
||||||
def change_index(self, *args):
|
def change_index(self, *args):
|
||||||
new_index = 1 if self.index == 0 else 0
|
new_index = 1 if self.index == 0 else 0
|
||||||
self._camera._set_index(new_index)
|
self._camera._set_index(new_index)
|
||||||
@ -69,6 +72,11 @@ class QrReader(XCamera):
|
|||||||
self.qr_result = None
|
self.qr_result = None
|
||||||
Logger.info('QrReader:Initialed')
|
Logger.info('QrReader:Initialed')
|
||||||
|
|
||||||
|
def set_angle(self, *args, **kwargs):
|
||||||
|
print('kwargs=', kwargs)
|
||||||
|
angle = kwargs.get('angle', 0)
|
||||||
|
self.angle = angle
|
||||||
|
|
||||||
def getValue(self):
|
def getValue(self):
|
||||||
return {
|
return {
|
||||||
"qr_result":self.qr_result
|
"qr_result":self.qr_result
|
||||||
@ -88,7 +96,7 @@ class QrReader(XCamera):
|
|||||||
super(QrReader, self).on_tex(self.texture)
|
super(QrReader, self).on_tex(self.texture)
|
||||||
|
|
||||||
def dismiss(self, *args, **kw):
|
def dismiss(self, *args, **kw):
|
||||||
self.release()
|
self.play = False
|
||||||
cv2.destroyAllWindows()
|
cv2.destroyAllWindows()
|
||||||
|
|
||||||
Builder.load_string(btxt)
|
Builder.load_string(btxt)
|
||||||
|
Loading…
Reference in New Issue
Block a user