fix c2 import
This commit is contained in:
@@ -3695,7 +3695,8 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec,
|
|||||||
code=uuid4().hex[:16], c2id=c2id)
|
code=uuid4().hex[:16], c2id=c2id)
|
||||||
|
|
||||||
startdatetime, starttime, workoutdate, duration, starttimeunix, timezone = utils.get_startdatetime_from_c2data(
|
startdatetime, starttime, workoutdate, duration, starttimeunix, timezone = utils.get_startdatetime_from_c2data(
|
||||||
data)
|
data
|
||||||
|
)
|
||||||
|
|
||||||
s = 'Time zone {timezone}, startdatetime {startdatetime}, duration {duration}'.format(
|
s = 'Time zone {timezone}, startdatetime {startdatetime}, duration {duration}'.format(
|
||||||
timezone=timezone, startdatetime=startdatetime,
|
timezone=timezone, startdatetime=startdatetime,
|
||||||
@@ -3755,6 +3756,7 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec,
|
|||||||
strokelength = np.zeros(nr_rows)
|
strokelength = np.zeros(nr_rows)
|
||||||
|
|
||||||
dist2 = 0.1*strokedata.loc[:, 'd']
|
dist2 = 0.1*strokedata.loc[:, 'd']
|
||||||
|
cumdist, intervals = make_cumvalues(dist2)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
spm = strokedata.loc[:, 'spm']
|
spm = strokedata.loc[:, 'spm']
|
||||||
@@ -3796,7 +3798,7 @@ def handle_c2_async_workout(alldata, userid, c2token, c2id, delaysec,
|
|||||||
' lapIdx': lapidx,
|
' lapIdx': lapidx,
|
||||||
' WorkoutState': 4,
|
' WorkoutState': 4,
|
||||||
' ElapsedTime (sec)': seconds,
|
' ElapsedTime (sec)': seconds,
|
||||||
'cum_dist': dist2
|
'cum_dist': cumdist
|
||||||
})
|
})
|
||||||
|
|
||||||
df.sort_values(by='TimeStamp (sec)', ascending=True)
|
df.sort_values(by='TimeStamp (sec)', ascending=True)
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
Reference in New Issue
Block a user