set total distance and time to Concept2 data
This commit is contained in:
@@ -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 = row.df['TimeStamp (sec)'].max()-row.df['TimeStamp (sec)'].min()
|
||||||
totaltime = totaltime+row.df.ix[0,' ElapsedTime (sec)']
|
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.)
|
hours = int(totaltime/3600.)
|
||||||
minutes = int((totaltime - 3600.*hours)/60.)
|
minutes = int((totaltime - 3600.*hours)/60.)
|
||||||
|
|||||||
Reference in New Issue
Block a user