From 45322046e9fa6a34faae9d5849470fea4f9e56a7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 10 Nov 2023 12:00:25 +0200 Subject: [PATCH 1/2] Improve logging for pedalboard screenshots Signed-off-by: falkTX --- mod/screenshot.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/screenshot.py b/mod/screenshot.py index a7e0a0d8..eefdb9e1 100644 --- a/mod/screenshot.py +++ b/mod/screenshot.py @@ -5,6 +5,7 @@ import os import subprocess import sys +import logging from tornado.ioloop import IOLoop from mod.settings import HTML_DIR, DEV_ENVIRONMENT, DEVICE_KEY, CACHE_DIR @@ -27,7 +28,7 @@ def generate_screenshot(bundle_path, callback): cmd = [os.path.join(cwd, 'mod-pedalboard'), 'take_screenshot', bundle_path, HTML_DIR, CACHE_DIR] if sys.platform == 'win32': cmd[0] += ".exe" - print(' '.join(cmd)) + logging.debug('[screenshot] now running: %s', ' '.join(cmd)) # regular run else: @@ -44,6 +45,7 @@ def proc_callback(): return if not os.path.exists(screenshot) or not os.path.exists(thumbnail): + logging.warn('[screenshot] process finished but image files do not exist') callback() return @@ -94,7 +96,7 @@ def img_callback(thumbnail=None): try: generate_screenshot(self.processing, img_callback) except Exception as ex: - print('ERROR: {0}'.format(ex)) + logging.error('[screenshot] %s', ex) img_callback() def check_screenshot(self, bundlepath): From fb95e3dca8dbcc2fbacabf01dbb0f80630ff9c71 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 15 Nov 2023 20:52:26 +0100 Subject: [PATCH 2/2] Fix data type for CMD_TUNER Signed-off-by: falkTX --- mod/hmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/hmi.py b/mod/hmi.py index 6e2a1b61..7ad8cbf8 100644 --- a/mod/hmi.py +++ b/mod/hmi.py @@ -459,7 +459,7 @@ def ping(self, callback): self.send(CMD_PING, callback, 'boolean') def tuner(self, freq, note, cents, callback): - self.send('%s %f %s %f' % (CMD_TUNER, freq, note, cents), callback) + self.send('%s %f %s %d' % (CMD_TUNER, freq, note, cents), callback) #TODO, This message should be handled by mod-system-control once in place def expression_overcurrent(self, callback):