Private
Public Access
1
0

fixed small C2 stuff bug

This commit is contained in:
Sander Roosendaal
2019-08-26 14:35:53 +02:00
parent c8435a9050
commit ce582f7563
2 changed files with 15 additions and 3 deletions

View File

@@ -416,9 +416,17 @@ def createc2workoutdata(w):
# adding diff, trying to see if this is valid
t = 10*row.df.loc[:,'TimeStamp (sec)'].values-10*row.df.loc[:,'TimeStamp (sec)'].iloc[0]
t[0] = t[1]
try:
t[0] = t[1]
except IndexError:
pass
d = 10*row.df.loc[:,' Horizontal (meters)'].values
d[0] = d[1]
try:
d[0] = d[1]
except IndexError:
pass
p = abs(10*row.df.loc[:,' Stroke500mPace (sec/500m)'].values)
p = np.clip(p,0,3600)
if w.workouttype == 'bike':
@@ -428,7 +436,11 @@ def createc2workoutdata(w):
d = d.astype(int)
p = p.astype(int)
spm = row.df[' Cadence (stokes/min)'].astype(int)
spm[0] = spm[1]
try:
spm[0] = spm[1]
except IndexError:
pass
try:
hr = row.df[' HRCur (bpm)'].astype(int)
except ValueError:

Binary file not shown.