How to use the choochoo.fit.decode.DataMsg function in choochoo

To help you get started, we’ve selected a few choochoo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github andrewcooke / choochoo / choochoo / fit / decode.py View on Github external
def __data_msg(self, defn, data):
        if defn.timestamp_field:
            field = defn.timestamp_field
            self.__timestamp = self.__parse_date.parse(data[field.start:field.finish], 1, defn.endian)[0]
        # include timestamp here so that things like laps can be correlated with timed data
        return DataMsg(defn, data, self.__timestamp)