Add live metadata updates

This commit is contained in:
CPD 2025-03-17 15:30:29 +01:00
parent 041fcf6b71
commit b6a40f2c93

View File

@ -141,6 +141,10 @@ def measure(
elif type(recv) == tuple and recv[0] == "led_script":
log.info(f"Received 'led_script', replacing script")
led_script = recv[1]
elif type(recv) == tuple and recv[0] == "metadata":
log.info(f"Received 'metadata', updating metadata")
data.metadata |= recv[1]
data.write_metadata()
else:
log.error(f"Received invalid message: '{recv}'")