scrapper / fit4ruby

Fit4Ruby is a Ruby library to read and write FIT files.
GNU General Public License v2.0
26 stars 17 forks source link

Allow an empty crc in a 14 byte header #19

Open MovingEarth opened 4 years ago

MovingEarth commented 4 years ago

As specified in ANT FIT Protocol Rev2.4 Paragraph 3.3.1 "Computing the CRC is optional when using a 14 byte file header, it is permissible to set it to 0x0000."

The FIT files from my forrunner 610 have not crc set. The two crc bytes in the file header are 0x0000. As specified in the protocol this is allowed. However the code this not account for this. Without this fix, reading the FIT file wil log an Error