Updated data processing in barcode_recipe_selection

In the barcode_recipe_selection.py script, the way data is split and processed has been revised. 'Splitlines' is now used instead of 'split("-")', and the length for candidates was changed from 8 to 10.

FIX
This commit is contained in:
eduardo 2024-05-13 09:02:44 +02:00
parent 9f90343666
commit c8333273ff

View File

@ -73,9 +73,9 @@ class Barcode_Recipe_Selection(Test_Test):
if data is None:
return
else:
# lines = data.splitlines()
lines = data.split("-")
candidates = [i for i in lines if len(i)==8]
lines = data.splitlines()
#lines = data.split("-")
candidates = [i for i in lines if len(i)==10]
if len(candidates)>0:
# RECIPE CODE FOUND
self.recipe=candidates[-1]