Skip to content

Commit

Permalink
SerialMonitor: limit float precision when writing file
Browse files Browse the repository at this point in the history
  • Loading branch information
Compizfox committed Jul 11, 2022
1 parent a08f1da commit 3c45d61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def sigint_handler(signal, frame):

# Write data to text file
print(f"Saving to {filename}...")
np.savetxt(filename, np.array(data).transpose(), header=' '.join(sr.header), comments='')
np.savetxt(filename, np.array(data).transpose(), fmt='%i'+' %.4f'*(len(data) - 1), header=' '.join(sr.header), comments='')

sys.exit(0)
return sigint_handler
Expand Down

0 comments on commit 3c45d61

Please sign in to comment.