player Lock function & prep for more metrics
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user