fix default duration
This commit is contained in:
parent
38d0ef4714
commit
9c58191722
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user