Inventree

This commit is contained in:
Andrew Collins
2025-01-16 07:12:50 +00:00
parent ea94aadb13
commit 51cacff367
19 changed files with 1434 additions and 550 deletions

View File

@@ -115,8 +115,8 @@ def comp_format(filt, offset):
t[p] = "{:.2f}".format(abs(float(t[p]) - offset[n]))
rotation = float(t[rot])
rotation = rotation + offset[2]
if rotation > 180.0:
rotation = -1 * (360.0 - rotation)
# Wrap the phase [-180, 180]
rotation = (rotation + 180.0) % (2 * 180.0) - 180.0
t[rot] = "{:.2f}".format(rotation)
out.append(t)
return out