summaryrefslogtreecommitdiff
path: root/src/esp32cam_capture_diff_node.py
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-06-16 23:32:52 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-06-16 23:32:52 +0300
commit1cdcd1a08d2a3e676b188c573d62d91727c45025 (patch)
treedf904548e7cc0072aa5ca100f05d2c3edeea72bd /src/esp32cam_capture_diff_node.py
parent3825b9be16319d2872409e143f5b8ead07746d81 (diff)
esp32cam_capture_diff_node: add debug logs
Diffstat (limited to 'src/esp32cam_capture_diff_node.py')
-rw-r--r--src/esp32cam_capture_diff_node.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/esp32cam_capture_diff_node.py b/src/esp32cam_capture_diff_node.py
index d6be146..5bbfdf7 100644
--- a/src/esp32cam_capture_diff_node.py
+++ b/src/esp32cam_capture_diff_node.py
@@ -49,14 +49,15 @@ class ESP32CamCaptureDiffNode:
self.nextpic = 1 if self.nextpic == 2 else 2
if not self.first:
diff = await pyssim(filename, os.path.join(self.directory, self.getfilename()))
+ logger.debug(f'pyssim: diff={diff}')
n = 0
if diff < 0.93:
n = 3
elif n < 0.955:
n = 1
if n > 0:
+ logger.info(f'diff = {diff}, informing central server')
send_datagram(stringify([config['node']['name'], n]), self.server_addr)
- logger.info(f'diff = {diff}')
self.first = False
logger.debug('capture: done')