more coverage related
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user