Skip to content

Commit

Permalink
Appending milliseconds to filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
ta6o committed Jan 21, 2020
1 parent a8eabf4 commit ff4ba60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/receiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def set_center_freq(self, center_freq, rf_center_freq):
file_name = "/dev/null"
else:
# Otherwise use frequency and time stamp for file name
tstamp = "_" + str(int(time.time()))
# tstamp = "_" + str(int(time.time()))
tstamp = "_" + str.replace(str("%.3f" % time.time()),".","")
file_freq = (rf_center_freq + self.center_freq)/1E6
file_freq = np.round(file_freq, 3)
file_name = 'wav/' + '{:.3f}'.format(file_freq) + tstamp + ".wav"
Expand Down

0 comments on commit ff4ba60

Please sign in to comment.