Fix bugs
This commit is contained in:
parent
2a33ad0b49
commit
61c64d47fd
|
|
@ -2,4 +2,4 @@ Flask
|
||||||
pillow
|
pillow
|
||||||
gphoto2
|
gphoto2
|
||||||
scipy
|
scipy
|
||||||
gpiod
|
waitress
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ def delay_capture(cam):
|
||||||
def delay_save(cam, source, target):
|
def delay_save(cam, source, target):
|
||||||
# Measure the time it takes to save
|
# Measure the time it takes to save
|
||||||
start = time.time()
|
start = time.time()
|
||||||
output = cam.capture()
|
|
||||||
cam.save(source, target)
|
cam.save(source, target)
|
||||||
delta = time.time() - start
|
delta = time.time() - start
|
||||||
|
|
||||||
|
|
@ -28,8 +27,6 @@ def delay_save(cam, source, target):
|
||||||
if config.DELAY is not None and delta < config.DELAY:
|
if config.DELAY is not None and delta < config.DELAY:
|
||||||
time.sleep(config.DELAY - delta)
|
time.sleep(config.DELAY - delta)
|
||||||
|
|
||||||
return output
|
|
||||||
|
|
||||||
|
|
||||||
def scan(output_dir: str, on_and_off: bool = True):
|
def scan(output_dir: str, on_and_off: bool = True):
|
||||||
os.makedirs(output_dir, exist_ok=True)
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue