Private
Public Access
1
0

set total distance and time to Concept2 data

This commit is contained in:
Sander Roosendaal
2017-01-14 09:30:00 +01:00
parent 24364dcfb1
commit 645e7e3c63

View File

@@ -468,6 +468,14 @@ def add_workout_from_strokedata(user,importid,data,strokedata,
totaltime = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
totaltime = totaltime+row.df.ix[0,' ElapsedTime (sec)']
# with Concept2
if source=='c2':
try:
totaldist = data['distance']
totaltime = data['time']/10.
except KeyError:
pass
hours = int(totaltime/3600.)
minutes = int((totaltime - 3600.*hours)/60.)