Fixed logging

This commit is contained in:
Sebastian 2018-07-16 21:53:49 +02:00
parent 4dd13016e4
commit e9fe44fad0
1 changed files with 2 additions and 2 deletions

View File

@ -13,10 +13,10 @@ def main():
line = ser.readline()
line = line.decode("ascii")[:-1]
print("[%s] >> %s" % (time.strftime('%H:%m:%S'), line))
print("[%s] >> %s" % (time.strftime('%H:%M:%S'), line))
if line == "?":
timestamp = "%d\n" % int(time.time())
print("[%s] << %s" % (time.strftime('%H:%m:%S'),timestamp[:-1]))
print("[%s] << %s" % (time.strftime('%H:%M:%S'),timestamp[:-1]))
ser.write(timestamp.encode('ascii'))