no elevation
This commit is contained in:
parent
d6ab940f6b
commit
d711133b86
10
camera.py
10
camera.py
|
@ -289,11 +289,11 @@ class Camera:
|
||||||
#print(current, delta, move)
|
#print(current, delta, move)
|
||||||
current, delta = get_delta()
|
current, delta = get_delta()
|
||||||
changed = False
|
changed = False
|
||||||
if 'azimuth' in delta and 'azimuth' in direction:
|
if delta and 'azimuth' in delta and 'azimuth' in direction:
|
||||||
if pan and (not delta['azimuth'] or (delta['azimuth'] >= 0) != direction['azimuth']):
|
if pan and (not delta['azimuth'] or (delta['azimuth'] >= 0) != direction['azimuth']):
|
||||||
pan = 0
|
pan = 0
|
||||||
changed = True
|
changed = True
|
||||||
else:
|
elif delta:
|
||||||
print('why no azimuth? delta: %s direction: %s' % (delta, direction))
|
print('why no azimuth? delta: %s direction: %s' % (delta, direction))
|
||||||
'''
|
'''
|
||||||
if pan > 0:
|
if pan > 0:
|
||||||
|
@ -303,9 +303,13 @@ class Camera:
|
||||||
pan = max(pan, delta['azimuth'])
|
pan = max(pan, delta['azimuth'])
|
||||||
changed = True
|
changed = True
|
||||||
'''
|
'''
|
||||||
if tilt and (not delta['elevation'] or (delta['elevation'] >= 0) != direction['elevation']):
|
if delta and 'elevation' in delta and 'elevation' in direction:
|
||||||
|
if tilt and delta and (not delta['elevation'] or (delta['elevation'] >= 0) != direction['elevation']):
|
||||||
tilt = 0
|
tilt = 0
|
||||||
changed = True
|
changed = True
|
||||||
|
elif delta:
|
||||||
|
print('why no elevation? delta: %s direction: %s' % (delta, direction))
|
||||||
|
|
||||||
'''
|
'''
|
||||||
if tilt > 0:
|
if tilt > 0:
|
||||||
tilt = min(tilt, delta['elevation'])
|
tilt = min(tilt, delta['elevation'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user