Private
Public Access
1
0

added menu items

This commit is contained in:
Sander Roosendaal
2020-01-07 18:14:27 +01:00
parent 07e9a5abf1
commit d88a0f7aea
3 changed files with 23 additions and 12 deletions

View File

@@ -1437,18 +1437,16 @@ def handle_nonpainsled(f2, fileformat, summary=''):
f_to_be_deleted = f2
# should delete file
f2 = f2[:-4] + 'o.csv'
try:
row2 = rrdata(df = row.df)
if fileformat == 'speedcoach2':
# impeller consistency
impellerdata, consistent, ratio = row.impellerconsistent(threshold=0.3)
if impellerdata and consistent:
impeller = True
if impellerdata and not consistent:
row2.use_gps()
row2.write_csv(f2, gzip=True)
except:
return (0,'',0,0,'',impeller)
row2 = rrdata(df = row.df)
if 'speedcoach2' in fileformat:
# impeller consistency
impellerdata, consistent, ratio = row.impellerconsistent(threshold=0.3)
if impellerdata and consistent:
impeller = True
if impellerdata and not consistent:
row2.use_gpsdata()
row2.write_csv(f2, gzip=True)
# os.remove(f2)
try:

View File

@@ -287,6 +287,18 @@
<i class="fas fa-calculator-alt fa-fw"></i>&nbsp;OTW Power
</a>
</li>
{% if 'speedcoach2' in workout.workoutsource %}
<li id="advanced-usegps">
<a href="/rowers/workout/{{ workout.id|encode }}/otwusegps/">
<i class="fas fa-satellite"></i>&nbsp;Use GPS data
</a>
</li>
<li id="advanced-useimpeller">
<a href="/rowers/workout/{{ workout.id|encode }}/otwuseimpeller/">
<i class="fas fa-wind-turbine fa-rotate-180"></i>&nbsp;Use Impeller data
</a>
</li>
{% endif %}
{% endif %}
<li id="advanced-instroke">
<a href="/rowers/workout/{{ workout.id|encode }}/instroke/">