supporto assemblati whip
This commit is contained in:
parent
3f72be3abc
commit
941e3ba764
|
|
@ -12,6 +12,7 @@ class Test_Barcodes(Test_Test):
|
|||
def __init__(self, components=None, recipe=None, step=None, pieces=None, run_once=False, reset_on_start=True, enable_override=False):
|
||||
super().__init__(components=components, recipe=recipe, step=step, pieces=pieces, run_once=run_once, reset_on_start=reset_on_start, enable_override=enable_override)
|
||||
self.current_step_barcode_name = None
|
||||
self.start_counter = 0
|
||||
self.barcodes_spec = {
|
||||
"serial": self.check_serial_barcode,
|
||||
"barcode_input_2": self.check_serial_barcode,
|
||||
|
|
@ -29,11 +30,16 @@ class Test_Barcodes(Test_Test):
|
|||
|
||||
def start(self, recipe=None, step=None, pieces=None):
|
||||
show = super().start(recipe=recipe, step=step, pieces=pieces)
|
||||
self.start_counter += 1
|
||||
npieces = self.step.spec.get("n_pieces")
|
||||
npieces = int(npieces) if npieces is not None else 0
|
||||
if self.start_counter > npieces + 1: # If start_counter exceeds npieces + 1
|
||||
self.start_counter = 1
|
||||
display_str = "{}/{}".format(self.start_counter, npieces + 1)
|
||||
self.counter_l.setText(display_str)
|
||||
if show is False:
|
||||
return show
|
||||
self.current_step_barcode_name = self.step.spec.get('barcode_name')
|
||||
self.counter_l.setText(self.step.spec.get("n_pieces"))
|
||||
|
||||
self.expected_barcode.setText(self.step.spec.get(self.current_step_barcode_name))
|
||||
self.visualize()
|
||||
self.barcodes_le.setPalette(self.status_palettes[None])
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user