diff --git a/rowers/templates/export.html b/rowers/templates/export.html index e4eab5e2..d207cf0b 100644 --- a/rowers/templates/export.html +++ b/rowers/templates/export.html @@ -124,7 +124,7 @@ {% endif %} {% else %}
- + Underarmour icon
{% endif %} diff --git a/rowers/underarmourstuff.py b/rowers/underarmourstuff.py index 98607567..31d310df 100644 --- a/rowers/underarmourstuff.py +++ b/rowers/underarmourstuff.py @@ -238,12 +238,12 @@ def createunderarmourworkoutdata(w): haslatlon = 0 # short for debugging -# t = t[:3] -# d = d[:3] - # lat = lat[:3] - # hr = hr[:3] - # lon = lon[:3] - # spm = spm[:3] + t = t[:10] + d = d[:10] + lat = lat[:10] + hr = hr[:10] + lon = lon[:10] + spm = spm[:10] # path data if haslatlon: @@ -283,9 +283,11 @@ def createunderarmourworkoutdata(w): } aggregrates = { - "elapsed_time_total": duration, - "distance_total": max(d), + "elapsed_time_total": int(duration), + "distance_total": int(max(d)), "heartrate_avg": averagehr, + "heart_rate_min": int(min(hr)), + "heart_rate_max": int(max(hr)), } # if haslatlon: @@ -312,6 +314,17 @@ def get_idfromuri(user,links): return id,typename +def getidfromresponse(response): + t = json.loads(response.text) + + links = t["_links"] + + id = links["self"][0]["id"] + + return int(id) + + + def get_typefromid(typeid,user): r = Rower.objects.get(user=user) authorizationstring = str('Bearer ' + r.underarmourtoken) diff --git a/static/img/uachecked.png b/static/img/uachecked.png index 4a445ab0..888fb1ee 100644 Binary files a/static/img/uachecked.png and b/static/img/uachecked.png differ