Pull requests

#2 Merged
Repository
adambird adambird
Branch
default
Repository
schinckel schinckel
Branch
default

Supporting reading TCX and FIT files from devices

Author
  1. Adam Bird
Reviewers
Description

Either FIT or TCX can be retrieved using file id or relative path retrieved from the directory reading methods readActivities and readFITActivities.

The return data is either a string in the case of XML activity files of Uint8Array in the case of FIT files. Both can be used to create a Blob for appending to FormData when posting files via XmlHTTPRequest

Comments (2)

  1. Matthew Schinckel repo owner

    Having not touched this code for quite some time, I'll probably need to look into it further. It helps I also now have a device that handles FIT data.

    That said, there are a few things that would prevent me accepting this request. There is a 'console.log()' line, which breaks browsers without decent devtools installed (ie, FF without Firebug).

    I also thought I saw a variable that leaked to global scope, but that was late last night, and I can't seem to find it now.

  2. Adam Bird author

    Sorry about the console.log() missed that one when stripping them out :)

    re variable, I suspect it was the decodeBinaryFile method that I hadn't cleanly scoped. Will update the request to this end and have also moved it into the * Handlers * section of the code as it makes more sense there.