Private
Public Access
1
0

more coverage related

This commit is contained in:
Sander Roosendaal
2021-04-23 14:18:13 +02:00
parent 99dfb171b5
commit e19158926d
10 changed files with 383 additions and 297 deletions

View File

@@ -179,6 +179,11 @@ def step_to_garmin(step,order=0):
durationtype = step['dict']['durationType']
durationvalue = step['dict']['durationValue']
durationvaluetype = ''
try:
intensity = step['dict']['intensity']
except KeyError:
intensity = None
#durationvaluetype = ''
if durationtype == 'Time':
durationtype = 'TIME'
durationvalue = int(durationvalue/1000.)
@@ -217,20 +222,40 @@ def step_to_garmin(step,order=0):
elif durationtype == 'Reps':
durationtype = 'REPS'
try:
targetType = step['dict']['targetType']
except KeyError:
targetType = None
try:
targetValue = step['dict']['targetValue']
except KeyError:
targetValue = None
try:
targetValueLow = step['dict']['targetValueLow']
except KeyError:
targetValueLow = None
try:
targetValueHigh = step['dict']['targetValueHigh'],
except KeyError:
targetValueHigh = None
out = {
'type': step['type'],
'stepOrder':order,
'repeatType':step['type'],
'repeatValue':step['repeatValue'],
'intensity':step['dict']['intensity'],
'intensity':intensity,
'description':step['dict']['wkt_step_name'],
'durationType':durationtype,
'durationValue':durationvalue,
'durationValueType':durationvaluetype,
'targetType':step['dict']['targetType'],
'targetValue':step['dict']['targetValue'],
'targetValueLow':step['dict']['targetValueLow'],
'targetValueHigh':step['dict']['targetValueHigh'],
'targetType':targetType,
'targetValue':targetValue,
'targetValueLow':targetValueLow,
'targetValueHigh':targetValueHigh,
}
try:
steps = step['steps']