Private
Public Access
1
0

player Lock function & prep for more metrics

This commit is contained in:
Sander Roosendaal
2019-11-11 21:54:37 +01:00
parent 1c87210a57
commit 87822b4617
2 changed files with 129 additions and 38 deletions

View File

@@ -90,7 +90,25 @@ def get_video_data(w):
maxtime = coordinates['time'].max()
return data, mapscript, mapdiv, maxtime
metrics = {
'spm': {
'unit': '',
'metric': 'spm',
'name': 'SPM',
},
'boatspeed': {
'unit': 'm/s',
'metric': 'boatspeed',
'name': 'Boat Speed'
},
'catch': {
'unit': 'degrees',
'metric': 'catch',
'name': 'Catch Angle'
}
}
return data, metrics, mapscript, mapdiv, maxtime
# Show a video compared with data
def workout_video_view(request,id=''):
@@ -141,7 +159,7 @@ def workout_video_view(request,id=''):
form = None
# get data
data, mapscript, mapdiv, maxtime = get_video_data(w)
data, metrics, mapscript, mapdiv, maxtime = get_video_data(w)
breadcrumbs = [
{
@@ -172,6 +190,7 @@ def workout_video_view(request,id=''):
'breadcrumbs':breadcrumbs,
'analysis':analysis,
'maxtime':maxtime,
'metrics':metrics,
})
@@ -221,7 +240,7 @@ def workout_video_create_view(request,id=0):
delay = 0
# get data
data, mapscript, mapdiv, maxtime = get_video_data(w)
data, metrics, mapscript, mapdiv, maxtime = get_video_data(w)
breadcrumbs = [
{
@@ -254,6 +273,8 @@ def workout_video_create_view(request,id=0):
'analysis':analysis,
'breadcrumbs':breadcrumbs,
'maxtime':maxtime,
'metrics':metrics,
'locked': False,
})
# Show the EMpower Oarlock generated Stroke Profile