mrihtar / Garmin-FIT

Perl code for reading and conversion of Garmin FIT binary files
73 stars 20 forks source link

Undefined subroutine &Garmin::FIT::unpackfiltr_uint64 called #27

Open mipapo opened 4 years ago

mipapo commented 4 years ago

Do you have an idea how to fix it?

1828c26f-0824-48d8-a72c-e1266850a158.new (1).zip

laufhannes commented 4 years ago

I guess those are simple typos (...filtr_... instead of ...filter_...):

--- call/perl/Garmin/FIT.pm (revision 0629082504e7db4f8e2320873b10203b1062c1d7)
+++ call/perl/Garmin/FIT.pm (date 1598856390075)
@@ -831,10 +831,10 @@
 else {
   $template[FIT_SINT64] = $template[FIT_UINT64] = $template[FIT_UINT64Z] = 'L';
   $packfactor[FIT_SINT64] = $packfactor[FIT_UINT64] = $packfactor[FIT_UINT64Z] = 2;
-  $packfilter[FIT_SINT64] = \&packfiltr_sint64;
-  $unpackfilter[FIT_SINT64] = \&unpackfiltr_sint64;
-  $packfilter[FIT_UINT64] = $packfilter[FIT_UINT64Z] = \&packfiltr_uint64;
-  $unpackfilter[FIT_UINT64] = $unpackfilter[FIT_UINT64Z] = \&unpackfiltr_uint64;
+  $packfilter[FIT_SINT64] = \&packfilter_sint64;
+  $unpackfilter[FIT_SINT64] = \&unpackfilter_sint64;
+  $packfilter[FIT_UINT64] = $packfilter[FIT_UINT64Z] = \&packfilter_uint64;
+  $unpackfilter[FIT_UINT64] = $unpackfilter[FIT_UINT64Z] = \&unpackfilter_uint64;
 }

 %named_type =
mrihtar commented 4 years ago

Support for 64-bit integers is not tested at all and needs more investigation (quote from the original author Mr. Suto).