From c61edc168c2cdab94d5fefba3594fb227add54bf Mon Sep 17 00:00:00 2001 From: MovingEarth <40818895+MovingEarth@users.noreply.github.com> Date: Sun, 24 Nov 2019 12:11:03 +0100 Subject: [PATCH] Allow an empty crc in a 14 byte header 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." --- lib/fit4ruby/FitHeader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fit4ruby/FitHeader.rb b/lib/fit4ruby/FitHeader.rb index 4edbe0c..f453cf5 100644 --- a/lib/fit4ruby/FitHeader.rb +++ b/lib/fit4ruby/FitHeader.rb @@ -62,7 +62,7 @@ def dump end def has_crc? - header_size.snapshot == 14 + header_size.snapshot == 14 && crc != 0x0000 end def end_pos