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))
|
||||
for key in direction:
|
||||
direction[key] *= speed
|
||||
print('move', direction)
|
||||
ctl.camera.momentary(direction, float(data.get('duration', 1)))
|
||||
duration = data.get('duration', 1)
|
||||
try:
|
||||
duration = float(duration)
|
||||
except:
|
||||
duration = 1.0
|
||||
print('move', direction, duration)
|
||||
ctl.camera.momentary(direction, duration)
|
||||
return result
|
||||
|
||||
def stop(self, **data):
|
||||
|
|
Loading…
Reference in New Issue
Block a user