cleared and added some todos
This commit is contained in:
4
main.py
4
main.py
@@ -71,9 +71,11 @@ def generateMap():
|
|||||||
payload = dictionary[key]['payload']
|
payload = dictionary[key]['payload']
|
||||||
|
|
||||||
datasta = convert_STA(payload)
|
datasta = convert_STA(payload)
|
||||||
|
# Parse unittime
|
||||||
timefromsta = datasta[0]
|
timefromsta = datasta[0]
|
||||||
timefromsta = datetime.fromtimestamp(timefromsta, tz)
|
timefromsta = datetime.fromtimestamp(timefromsta, tz)
|
||||||
timefromsta = timefromsta.strftime("%Y-%m-%d %H:%M:%S")
|
timefromsta = timefromsta.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
lat = datasta[1]
|
lat = datasta[1]
|
||||||
lon = datasta[2]
|
lon = datasta[2]
|
||||||
velocity = datasta[3]
|
velocity = datasta[3]
|
||||||
@@ -86,6 +88,7 @@ def generateMap():
|
|||||||
pwr = datasta[10]
|
pwr = datasta[10]
|
||||||
csq = datasta[11]
|
csq = datasta[11]
|
||||||
|
|
||||||
|
# Real time we got the STA
|
||||||
rtime = datetime.now(tz)
|
rtime = datetime.now(tz)
|
||||||
rtime = rtime.strftime("%Y-%m-%d %H:%M:%S")
|
rtime = rtime.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
|
||||||
@@ -108,6 +111,7 @@ def generateMap():
|
|||||||
|
|
||||||
|
|
||||||
# This is dictionary to be able to convert OBUID to unitID
|
# This is dictionary to be able to convert OBUID to unitID
|
||||||
|
#TODO: This function needs to update regularly
|
||||||
def helper():
|
def helper():
|
||||||
helper = {}
|
helper = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user