plus3network / fit

FIT Parser for Ant Fit devices
MIT License
11 stars 4 forks source link

Ensure compatibility with latest .fit format version 16.10 #9

Open vibgy opened 9 years ago

vibgy commented 9 years ago

Latest Profile Version = 16.10Release Current Profile Version = 3.10Release

For example: there are lot more sport type in the newer version.

Profile Version = 16.10Release

// Tag = development-akw-16.10.00-0
////////////////////////////////////////////////////////////////////////////////

package com.garmin.fit;

public enum Sport {
   GENERIC((short)0),
   RUNNING((short)1),
   CYCLING((short)2),
   TRANSITION((short)3),
   FITNESS_EQUIPMENT((short)4),
   SWIMMING((short)5),
   BASKETBALL((short)6),
   SOCCER((short)7),
   TENNIS((short)8),
   AMERICAN_FOOTBALL((short)9),
   TRAINING((short)10),
   WALKING((short)11),
   CROSS_COUNTRY_SKIING((short)12),
   ALPINE_SKIING((short)13),
   SNOWBOARDING((short)14),
   ROWING((short)15),
   MOUNTAINEERING((short)16),
   HIKING((short)17),
   MULTISPORT((short)18),
   PADDLING((short)19),
   FLYING((short)20),
   E_BIKING((short)21),
   MOTORCYCLING((short)22),
   BOATING((short)23),
   DRIVING((short)24),
   GOLF((short)25),
   HANG_GLIDING((short)26),
   HORSEBACK_RIDING((short)27),
   HUNTING((short)28),
   FISHING((short)29),
   INLINE_SKATING((short)30),
   ROCK_CLIMBING((short)31),
   SAILING((short)32),
   ICE_SKATING((short)33),
   SKY_DIVING((short)34),
   SNOWSHOEING((short)35),
   SNOWMOBILING((short)36),
   STAND_UP_PADDLEBOARDING((short)37),
   SURFING((short)38),
   WAKEBOARDING((short)39),
   WATER_SKIING((short)40),
   KAYAKING((short)41),
   RAFTING((short)42),
   WINDSURFING((short)43),
   KITESURFING((short)44),
   ALL((short)254),
   INVALID((short)255);
}

Profile Version = 3.10Release

// Tag = $Name: AKW3_100 $
////////////////////////////////////////////////////////////////////////////////

package com.garmin.fit;

public enum Sport {
   GENERIC((short)0),
   RUNNING((short)1),
   CYCLING((short)2),
   TRANSITION((short)3),
   FITNESS_EQUIPMENT((short)4),
   SWIMMING((short)5),
   BASKETBALL((short)6),
   SOCCER((short)7),
   TENNIS((short)8),
   AMERICAN_FOOTBALL((short)9),
   TRAINING((short)10),
   ALL((short)254),
   INVALID((short)255);
}
yocontra commented 9 years ago

@vibgy I think the JAR file needs to be updated, want to send a PR?

vibgy commented 9 years ago

If you can share the Java code :) otherwise I need to write it from scratch, which I don't know when I'll get to. On Wed, Oct 14, 2015 at 6:11 PM contra notifications@github.com wrote:

@vibgy https://github.com/vibgy I think the JAR file needs to be updated, want to send a PR?

— Reply to this email directly or view it on GitHub https://github.com/plus3network/fit/issues/9#issuecomment-148247899.

yocontra commented 9 years ago

@vibgy I didn't write it, I just grabbed it off their official sdk. This library is a binding to fitbits FIT file parser

yocontra commented 9 years ago

Actually, I think there is some code in there I wrote. I'll decompile the JAR and get back to you

yocontra commented 9 years ago

Yeah, JAR is a mess. I would recommend porting something like https://github.com/dtcooper/python-fitparse