Skip to content
Snippets Groups Projects
Commit 33698d31 authored by David Verelst's avatar David Verelst
Browse files

wetb.prepost.GenerateDLCs: also update formula field

parent b88c74b4
No related branches found
No related tags found
No related merge requests found
......@@ -134,11 +134,16 @@ class GeneralDLC(object):
if formula[0] == '"':
if key == '[wsp]' or key == '[gridgustdelay]':
fmt = '%2.2i'
formula = formula.replace(key, fmt%int(dlc[key][i]))
elif key == '[wdir]' or key == '[G_phi0]':
fmt = '%3.3i'
formula = formula.replace(key, fmt%int(dlc[key][i]))
elif key == '[sign]':
fmt = '%s'
formula = formula.replace(key, fmt%dlc[key][i])
else:
fmt = '%4.4i'
formula = formula.replace(key, fmt % int(dlc[key][i]))
formula = formula.replace(key, fmt % int(dlc[key][i]))
elif key in formula:
formula = formula.replace(key, '%s' % dlc[key][i])
formula = formula.replace(',', '.')
......@@ -269,4 +274,5 @@ if __name__ == '__main__':
dest='folder', help='Destination folder name')
opt = parser.parse_args()
DLB = GenerateDLCCases()
DLB.execute(filename=opt.filename, folder=opt.folder)
\ No newline at end of file
DLB.execute(filename=opt.filename, folder=opt.folder)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment