Private
Public Access
1
0

bug fix flex power zones

This commit is contained in:
Sander Roosendaal
2017-01-25 21:59:35 +01:00
parent 3cec874a84
commit 9072d50f5a
4 changed files with 42 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ import time
import gc
import gzip
import shutil
import numpy as np
import rowingdata
from rowingdata import main as rmain
@@ -17,6 +18,8 @@ from matplotlib import figure
import stravalib
from utils import serialize_list,deserialize_list
from rowers.dataprepnodjango import update_strokedata
from django.core.mail import send_mail, BadHeaderError,EmailMessage
@@ -171,6 +174,7 @@ def handle_otwsetpower(f1,boattype,weightvalue,
# This function generates all the static (PNG image) plots
@app.task
def handle_makeplot(f1,f2,t,hrdata,plotnr,imagename):
hrmax = hrdata['hrmax']
hrut2 = hrdata['hrut2']
hrut1 = hrdata['hrut1']
@@ -178,8 +182,8 @@ def handle_makeplot(f1,f2,t,hrdata,plotnr,imagename):
hrtr = hrdata['hrtr']
hran = hrdata['hran']
ftp = hrdata['ftp']
powerzones = hrdata['powerzones']
powerperc = hrdata['powerperc']
powerzones = deserialize_list(hrdata['powerzones'])
powerperc = np.array(deserialize_list(hrdata['powerperc'])).astype(int)
rr = rowingdata.rower(hrmax=hrmax,hrut2=hrut2,
hrut1=hrut1,hrat=hrat,