This commit is contained in:
germano 2023-07-25 21:18:16 +02:00
parent 2e830989b5
commit 2676809216
3 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ class RFID_PN532(Component):
self.tag_present=False self.tag_present=False
self.current_data=None self.current_data=None
self.is_win = platform.system().lower() == "windows" self.is_win = platform.system().lower() == "windows"
self.dev_list = [f"{self.config['fixture_rfid']['port']}:pn532"] if self.is_win else ['tty:USB0:pn532','tty:USB1:pn532'] self.dev_list = [f"{'com'if self.is_win else 'tty'}:{self.config['fixture_rfid']['port']}:pn532"]
self._period = 1 self._period = 1
def open_device(self): def open_device(self):

View File

@ -272,9 +272,9 @@ class TecnaMarpossProvasetT3(ModbusComponent):
recipe_barcode = f"j{recipe.part_number}"[:16].encode("ascii") recipe_barcode = f"j{recipe.part_number}"[:16].encode("ascii")
recipe_barcode += b"\x00" * (24 - len(recipe_barcode)) recipe_barcode += b"\x00" * (24 - len(recipe_barcode))
test_flags = 0b0110100001010100 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010100 test_flags = 0b0110100001010100 if (step.spec.get("autotest", False) in ["ko_check"]) else 0b0110000001010100
pid_mode = int(step.spec.get("pid_mode",self.config["recipes_defaults"]["pid_mode"]))<<4 pid_mode = int(self.config["recipes_defaults"]["pid_mode"])<<4
test_flags = test_flags | pid_mode test_flags = test_flags | pid_mode
pid_ramps=0b0000000000000000 | int(step.spec.get("pid_level",self.config["recipes_defaults"]["pid_level"]))<<8 | int(step.spec.get("pid_speed",self.config["recipes_defaults"]["pid_speed"]))<<12 pid_ramps=0b0000000000000000 | int(self.config["recipes_defaults"]["pid_level"])<<8 | int(self.config["recipes_defaults"]["pid_speed"])<<12
spec = { spec = {
"Flag: Instrument settings": 0b0000000000000000, "Flag: Instrument settings": 0b0000000000000000,
"Test program for read/write operation": table, "Test program for read/write operation": table,

View File

@ -35,7 +35,7 @@ connected=False
is_win = platform.system().lower() == "windows" is_win = platform.system().lower() == "windows"
if is_win: if is_win:
dev_list=['COM5:pn532'] dev_list=['com:COM1:pn532']
else: else:
dev_list = ['tty:USB0:pn532', 'tty:USB1:pn532', 'tty:USB2:pn532'] dev_list = ['tty:USB0:pn532', 'tty:USB1:pn532', 'tty:USB2:pn532']
while True: while True: