fix rfid
This commit is contained in:
parent
2e830989b5
commit
2676809216
@ -23,7 +23,7 @@ class RFID_PN532(Component):
|
||||
self.tag_present=False
|
||||
self.current_data=None
|
||||
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
|
||||
|
||||
def open_device(self):
|
||||
|
||||
@ -272,9 +272,9 @@ class TecnaMarpossProvasetT3(ModbusComponent):
|
||||
recipe_barcode = f"j{recipe.part_number}"[:16].encode("ascii")
|
||||
recipe_barcode += b"\x00" * (24 - len(recipe_barcode))
|
||||
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
|
||||
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 = {
|
||||
"Flag: Instrument settings": 0b0000000000000000,
|
||||
"Test program for read/write operation": table,
|
||||
|
||||
@ -35,7 +35,7 @@ connected=False
|
||||
is_win = platform.system().lower() == "windows"
|
||||
|
||||
if is_win:
|
||||
dev_list=['COM5:pn532']
|
||||
dev_list=['com:COM1:pn532']
|
||||
else:
|
||||
dev_list = ['tty:USB0:pn532', 'tty:USB1:pn532', 'tty:USB2:pn532']
|
||||
while True:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user