impeller stuff working, need beta testers
This commit is contained in:
@@ -33,6 +33,11 @@ def add_workout_from_data(userid,nkid,data,strokedata,source='nk',splitdata=None
|
||||
code = uuid4().hex[:16]
|
||||
)
|
||||
|
||||
try:
|
||||
userid=int(userid)
|
||||
except TypeError:
|
||||
userid = userid.id
|
||||
|
||||
strokedata.to_csv(csvfilename, index_label='index', compression='gzip')
|
||||
|
||||
title = data["name"]
|
||||
@@ -44,6 +49,7 @@ def add_workout_from_data(userid,nkid,data,strokedata,source='nk',splitdata=None
|
||||
oarlockSessions = data["oarlockSessions"]
|
||||
deviceId = data["deviceId"] # you could get the firmware version
|
||||
|
||||
|
||||
summary = get_nk_allstats(data,strokedata)
|
||||
|
||||
speedInput = data['speedInput'] # 0 = GPS; 1 = Impeller
|
||||
@@ -55,11 +61,16 @@ def add_workout_from_data(userid,nkid,data,strokedata,source='nk',splitdata=None
|
||||
oarLength = oarlocksession["oarLength"] # cm
|
||||
oarInboardLength = oarlocksession["oarInboardLength"] # cm
|
||||
seatNumber = oarlocksession["seatNumber"]
|
||||
try:
|
||||
oarlockfirmware = oarlocksession["firmwareVersion"]
|
||||
except KeyError:
|
||||
oarlockfirmware = ''
|
||||
else:
|
||||
boatName = ''
|
||||
oarLength = 289
|
||||
oarInboardLength = 88
|
||||
seatNumber = 1
|
||||
oarlockfirmware = ''
|
||||
|
||||
workouttype = "water"
|
||||
boattype = "1x"
|
||||
@@ -75,6 +86,7 @@ def add_workout_from_data(userid,nkid,data,strokedata,source='nk',splitdata=None
|
||||
'inboard': oarInboardLength/100.,
|
||||
'oarlength': oarLength/100.,
|
||||
'summary':summary,
|
||||
'oarlockfirmware':oarlockfirmware,
|
||||
}
|
||||
|
||||
session = requests.session()
|
||||
|
||||
Reference in New Issue
Block a user