Skip to content

Commit

Permalink
Fix timestamp in listen output
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2 committed May 2, 2017
1 parent 21492d7 commit 354d6af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyaci/aci_serial/AciUart.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def run(self):
try:
self.events_queue.put_nowait(parsedPacket)
except Full:
logging.error('Packet queue full... dropping packet')
pass
logging.debug('parsedPacket %r %s', parsedPacket, parsedPacket)
self.ProcessPacket(parsedPacket)

Expand Down
3 changes: 2 additions & 1 deletion pyaci/listen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def listen(serial_device):
# Wait for serial connection to be ready
time.sleep(2)
while True:
print(str.format("%.3f %s" %(time.time(), aci.events_queue.get())))
event = aci.events_queue.get()
print(str.format("%.3f %s" %(time.time(), event)))

if __name__ == '__main__':
parser = ArgumentParser()
Expand Down
4 changes: 2 additions & 2 deletions pyaci/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import os.path

class Uploader(object):
# Synchronize once every five minutes
TIME_SYNC_INTERVAL=5*60
# Synchronize once every minute
TIME_SYNC_INTERVAL=60

def __init__(self, sensei_config):
api_url = sensei_config["server"]["url"] + 'api/v1/'
Expand Down

0 comments on commit 354d6af

Please sign in to comment.