This commit is contained in:
germano2239 2022-07-27 16:21:59 +02:00
parent d9b09debb2
commit a490db9138
4 changed files with 7 additions and 5 deletions

View File

@ -23,7 +23,7 @@ archive_endpoint: https://r5portal.it/api/echo/
images_path: data/images
poll_time: 60
hold_time: 1
service_account_json: data/secrets/MACHINE-bucket-sevice-account_errecinque-prodserver-HEXHEXHEXHEX.json
service_account_json: data/secrets/errecinque-prodserver-9d4024fe9eed.json
bucket_id: MACHINE
[label_printer]

View File

@ -1,4 +1,5 @@
import sys
import traceback
if "--sim-serial" in sys.argv:
from components.dummies.serial import serial
@ -57,8 +58,9 @@ class ModbusComponent(Component):
read = self.client.read_holding_registers(register, count=count)
self.lock.unlock()
if read.isError():
# self.log.exception(traceback.format_exception(type(read), read, read.__traceback__))
raise read
self.log.exception(traceback.format_exception(type(read), read, read.__traceback__))
# raise read
return None
return read
def _write(self, register, value):

View File

@ -77,7 +77,7 @@ try:
self.config = ConfigReader()
# INIT COMPONENT
self.components_specs = {
"archive_synchronizer": {"c": ArchiveSynchronizer},
# "archive_synchronizer": {"c": ArchiveSynchronizer},
"galaxy_camera": {"c": GalaxyCamera, "k": {"paused": True}},
"label_printer": {"c": Os_Label_Printer, "t": False},
"neo_pixels": {"c": NeoPixels, "t": False},

View File

@ -53,7 +53,7 @@ def main():
cam.stream_on()
time.sleep(0.1)
# acquisition image: num is the image number
num = 1
num = 10
for i in range(num):
# get raw image
raw_image = cam.data_stream[0].get_image()