Exemplo n.º 1
0
 def samples(self, s=ActSample.empty()):
     # TODO: Detect timer start event and use that to reset timestamps.
     for event, elm in ET.iterparse(self.path):
         if elm.tag == self.TagPrefix + "Trackpoint": # end TrackPoint
             s = self.parseTrackpoint(elm, s)
             yield s
         elif elm.tag == self.TagPrefix + "Activity": # end first Activity
             break # Skip any subsequent Activity
Exemplo n.º 2
0
 def samples(self, s=ActSample.empty()):
     """Yield all trackpoints as ActSample objects."""
     for r in self.act.get_records_by_type('record'):
         s = self.parseFitRecord(r, s)
         yield s