Lacrosse add timestamps in JSON
This commit is contained in:
parent
d803d078cb
commit
5db16bbd34
1 changed files with 3 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
import datetime
|
||||
|
||||
def crc8(buf):
|
||||
crc = 0
|
||||
for j in range(5):
|
||||
|
@ -18,6 +20,7 @@ def csum(data):
|
|||
class rawsensor(object):
|
||||
def __init__(self, data):
|
||||
self._data = {}
|
||||
self._data['timestamp'] = datetime.datetime.now().replace(microsecond=0).isoformat()
|
||||
self.__raw = data
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Reference in a new issue