warn about missing azimuth

This commit is contained in:
j 2020-12-06 13:46:49 +01:00
parent df190dda02
commit 329cb1083d

View File

@ -289,9 +289,12 @@ 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 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:
print('why no azimuth? delta: %s direction: %s' % (delta, direction))
''' '''
if pan > 0: if pan > 0:
pan = min(pan, delta['azimuth']) pan = min(pan, delta['azimuth'])