fix default duration

This commit is contained in:
j 2021-11-23 10:48:08 +01:00
parent 38d0ef4714
commit 9c58191722

View File

@ -138,8 +138,13 @@ class API(object):
speed = int(data.get('speed', 1)) speed = int(data.get('speed', 1))
for key in direction: for key in direction:
direction[key] *= speed direction[key] *= speed
print('move', direction) duration = data.get('duration', 1)
ctl.camera.momentary(direction, float(data.get('duration', 1))) try:
duration = float(duration)
except:
duration = 1.0
print('move', direction, duration)
ctl.camera.momentary(direction, duration)
return result return result
def stop(self, **data): def stop(self, **data):