Private
Public Access
1
0

white space changes

This commit is contained in:
Sander Roosendaal
2020-03-18 21:12:53 +01:00
parent 3bcd14342a
commit c7e7bbb5ce
2 changed files with 4 additions and 2 deletions

View File

@@ -1453,6 +1453,7 @@ def parsenonpainsled(fileformat,f2,summary):
pass pass
hasrecognized = True hasrecognized = True
return row,hasrecognized,summary,fileformat return row,hasrecognized,summary,fileformat
def handle_nonpainsled(f2, fileformat, summary=''): def handle_nonpainsled(f2, fileformat, summary=''):
@@ -1474,6 +1475,7 @@ def handle_nonpainsled(f2, fileformat, summary=''):
# should delete file # should delete file
f2 = f2[:-4] + 'o.csv' f2 = f2[:-4] + 'o.csv'
row2 = rrdata(df = row.df) row2 = rrdata(df = row.df)
if 'speedcoach2' in fileformat: if 'speedcoach2' in fileformat:
# impeller consistency # impeller consistency
impellerdata, consistent, ratio = row.impellerconsistent(threshold=0.3) impellerdata, consistent, ratio = row.impellerconsistent(threshold=0.3)
@@ -1481,6 +1483,7 @@ def handle_nonpainsled(f2, fileformat, summary=''):
impeller = True impeller = True
if impellerdata and not consistent: if impellerdata and not consistent:
row2.use_gpsdata() row2.use_gpsdata()
row2.write_csv(f2, gzip=True) row2.write_csv(f2, gzip=True)

View File

@@ -235,8 +235,6 @@ def workout_csvemail_view(request,id=0):
w = get_workout(id) w = get_workout(id)
rowdata = rdata(w.csvfilename) rowdata = rdata(w.csvfilename)
code = str(uuid4()) code = str(uuid4())
filename = code+'.csv' filename = code+'.csv'
@@ -244,6 +242,7 @@ def workout_csvemail_view(request,id=0):
rowdate = rowdata.rowdatetime rowdate = rowdata.rowdatetime
starttimeunix = arrow.get(rowdate).timestamp starttimeunix = arrow.get(rowdate).timestamp
df = rowdata.df df = rowdata.df
try: try:
df[' ElapsedTime (sec)'] = df['TimeStamp (sec)'] df[' ElapsedTime (sec)'] = df['TimeStamp (sec)']
df['TimeStamp (sec)'] = df['TimeStamp (sec)'] + starttimeunix df['TimeStamp (sec)'] = df['TimeStamp (sec)'] + starttimeunix