Skip to content

Commit

Permalink
Merge pull request #27 from stanfordnmbl/dev-squat-analysis
Browse files Browse the repository at this point in the history
Add way to pass text info through json
  • Loading branch information
carmichaelong authored Jun 12, 2024
2 parents 7dabc57 + c9af44a commit 2807b1f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion squat_analysis/function/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def handler(event, context):
squat_type = 'Single leg squats (left)'
elif eventTypes[0] == 'single_leg_r':
squat_type = 'Single leg squats (right)'

# Pass squat type information into info_text dictionary.
info_text = {}
info_text['squat_type'] = {'label': 'Squat type detected',
'text': squat_type}

# Compute metrics.
max_trunk_lean_ground_mean, max_trunk_lean_ground_std, max_trunk_lean_ground_units = squat.compute_trunk_lean_relative_to_ground()
Expand Down Expand Up @@ -148,7 +153,7 @@ def handler(event, context):
'datasets': datasets,
'x_axis': 'time',
'y_axis': y_axes,
'squat_type': squat_type}
'info_text': info_text}

return {
'statusCode': 200,
Expand Down

0 comments on commit 2807b1f

Please sign in to comment.