typo fix tbt

This commit is contained in:
neo 2025-02-11 16:42:52 +01:00
parent fcf965bacc
commit ebd759f223
6 changed files with 13 additions and 13 deletions

View File

@ -65,7 +65,7 @@ def read_steps(row, config, defaults=None, unsupported_steps=None):
}, },
"instruction": {}, "instruction": {},
"pipe_cutter": { "pipe_cutter": {
"lenght": row.get("l_taglio_guaina_gc_[mm]", defaults["lunghezza_corrugato"]), "length": row.get("l_taglio_guaina_gc_[mm]", defaults["lunghezza_corrugato"]),
"diameter": row.get("diametro_corrugato", defaults["diametro_corrugato"]), "diameter": row.get("diametro_corrugato", defaults["diametro_corrugato"]),
}, },
# Empty placeholder for future extensions # Empty placeholder for future extensions

View File

@ -204,19 +204,19 @@ class Chipset(object):
if frame.startswith(self.SOF + b'\xFF\xFF'): if frame.startswith(self.SOF + b'\xFF\xFF'):
# extended frame # extended frame
if sum(frame[5:8]) & 0xFF != 0: if sum(frame[5:8]) & 0xFF != 0:
self.log.error("frame lenght checksum error") self.log.error("frame length checksum error")
raise IOError(errno.EIO, os.strerror(errno.EIO)) raise IOError(errno.EIO, os.strerror(errno.EIO))
if unpack(">H", memoryview(frame[5:7]))[0] != len(frame) - 10: if unpack(">H", memoryview(frame[5:7]))[0] != len(frame) - 10:
self.log.error("frame lenght value mismatch") self.log.error("frame length value mismatch")
raise IOError(errno.EIO, os.strerror(errno.EIO)) raise IOError(errno.EIO, os.strerror(errno.EIO))
del frame[0:8] del frame[0:8]
elif frame.startswith(self.SOF): elif frame.startswith(self.SOF):
# normal frame # normal frame
if sum(frame[3:5]) & 0xFF != 0: if sum(frame[3:5]) & 0xFF != 0:
self.log.error("frame lenght checksum error") self.log.error("frame length checksum error")
raise IOError(errno.EIO, os.strerror(errno.EIO)) raise IOError(errno.EIO, os.strerror(errno.EIO))
if frame[3] != len(frame) - 7: if frame[3] != len(frame) - 7:
self.log.error("frame lenght value mismatch") self.log.error("frame length value mismatch")
raise IOError(errno.EIO, os.strerror(errno.EIO)) raise IOError(errno.EIO, os.strerror(errno.EIO))
del frame[0:5] del frame[0:5]
else: else:
@ -590,8 +590,8 @@ class Device(device.Device):
def sense_dep(self, target): def sense_dep(self, target):
# Attempt active communication mode target activation. # Attempt active communication mode target activation.
assert target.atr_req, "the target.atr_req attribute is required" assert target.atr_req, "the target.atr_req attribute is required"
assert len(target.atr_req) >= 16, "minimum lenght of atr_req is 16" assert len(target.atr_req) >= 16, "minimum length of atr_req is 16"
assert len(target.atr_req) <= 64, "maximum lenght of atr_req is 64" assert len(target.atr_req) <= 64, "maximum length of atr_req is 64"
# bitrate and modulation type for send/recv must be set and equal # bitrate and modulation type for send/recv must be set and equal
assert target.brty_send and target.brty_recv assert target.brty_send and target.brty_recv

View File

@ -42,7 +42,7 @@ class Type4TagCommandError(nfc.tag.TagCommandError):
""" """
errno_str = { errno_str = {
# ISO/IEC 7816-4 (2005) APDU errors (SW1/SW2) # ISO/IEC 7816-4 (2005) APDU errors (SW1/SW2)
0x6700: "wrong lenght (general error)", 0x6700: "wrong length (general error)",
0x6900: "command not allowed (general error)", 0x6900: "command not allowed (general error)",
0x6981: "command incompatible with file structure", 0x6981: "command incompatible with file structure",
0x6982: "security status not satisfied", 0x6982: "security status not satisfied",

View File

@ -5,7 +5,7 @@ class Pipe_Cutter_Step_Editor(Editor):
def __init__(self, action=None, cell_widget=None): def __init__(self, action=None, cell_widget=None):
super().__init__(action=action, cell_widget=cell_widget) super().__init__(action=action, cell_widget=cell_widget)
self.spec.update({ self.spec.update({
"lenght": self.lenght_le, "length": self.length_le,
"diameter":self.diameter_le "diameter":self.diameter_le
}) })

View File

@ -45,7 +45,7 @@
<string>Lunghezza Corrugato</string> <string>Lunghezza Corrugato</string>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="lenght_le"> <widget class="QLineEdit" name="length_le">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>160</x> <x>160</x>

View File

@ -52,14 +52,14 @@ class Test_Pipe_Cutter(Test_Test):
""" """
Perform the pipe cutting process when in the 'ready for operation' state (102). Perform the pipe cutting process when in the 'ready for operation' state (102).
""" """
self.lenght = self.step.spec["lenght"] self.length = self.step.spec["length"]
self.diameter = self.step.spec["diameter"] self.diameter = self.step.spec["diameter"]
if self.current_status == 102: if self.current_status == 102:
try: try:
self.lenght = int(self.lenght)*100 self.length = int(self.length)*100
self.diameter = int(self.diameter)*100 self.diameter = int(self.diameter)*100
print(self.lenght) print(self.length)
self.components["pipe_cutter"].write_od_of_pipe(self.diameter) self.components["pipe_cutter"].write_od_of_pipe(self.diameter)
time.sleep(1) time.sleep(1)
self.components["pipe_cutter"].write_od_of_pipe(self.diameter) self.components["pipe_cutter"].write_od_of_pipe(self.diameter)