This commit is contained in:
unknown 2024-09-17 14:22:27 +03:00
parent 0abafb4ed0
commit 064606304a
1 changed files with 4 additions and 2 deletions

View File

@ -16,7 +16,7 @@ with open(file, 'r') as fp:
result = [] result = []
step = None step = None
for l in lines[20:120]: for l in lines[20:]:
data = l.strip().split(' ') data = l.strip().split(' ')
prep = {} prep = {}
for item in data: for item in data:
@ -24,8 +24,10 @@ with open(file, 'r') as fp:
if 'G' in prep and prep['G'] == '01': if 'G' in prep and prep['G'] == '01':
step = prep['G'] step = prep['G']
if step == '01': if step == '01':
if 'A' in prep:
prep['U'] = float(prep.pop('A')) / 100
if 'C' in prep: if 'C' in prep:
prep['U'] = float(prep.pop('C')) / 100 prep['W'] = float(prep.pop('C')) / 100
result.append([f"{p}{prep[p]}" for p in prep if p in ['X', 'Y', 'Z', 'U', 'V', 'W']]) result.append([f"{p}{prep[p]}" for p in prep if p in ['X', 'Y', 'Z', 'U', 'V', 'W']])
with open(f"{file}.result", 'w') as fp: with open(f"{file}.result", 'w') as fp: