garmin-exporter/src/utils/decode_fit_file.py

10 lines
234 B
Python

from garmin_fit_sdk import Decoder, Stream
def decode_fit_file(file):
stream = Stream.from_file(file)
decoder = Decoder(stream)
messages = decoder.read(
convert_datetimes_to_dates=True,
)
return messages