Repository navigation
Release v0.10.0 (2026-11-20)
Breaking Changes
- Behaviour change: FIT invalid sentinel values now decode as
Noneinstead
of numbers — scalars such asrecord.cadence(0xFF) andrecord.speed
(0xFFFF), and invalid elements inside arrays such as unsettime_in_*_zone
values. Callers must check forNonebefore arithmetic or comparisons; an
all-invalid numeric array is returned as a list ofNoneso positions survive.
Raw wire values are retained, so re-encoding is byte-identical, and FILE_TYPE
required-field checks now report a required field written as its sentinel as
missing. CSV export changes with it:FitFile.to_csvwrites an empty value cell
where it previously wrote the sentinel's decoded value (255bpm for
record.cadence,65.535m/s forrecord.speed,127.5% for
battery_soc), andto_rows()returnsNonethere, so anything that read
those numbers as data now sees a blank cell.
Bug Fixes
-
event.datanow also expands the three Profile subfield-gated component sets,
so packed event payloads decode into named fields instead of only auint32:
gear-change events (Di2 / eTap) populatefront_gear_num,front_gear,
rear_gear_numandrear_gear, Garmin Varia radar threat alerts populate
radar_threat_level_max,radar_threat_count,radar_threat_avg_approach_speed
andradar_threat_max_approach_speed(m/s), andsport_pointevents populate
scoreandopponent_score. The generator now emits these components from the
bundled Profile spreadsheet;event.datakeeps its packed wire value, so
re-encoding is unchanged. -
validate()andto_bytes(strict=True)no longer report WIRE size errors on
records that carry component-expanded fields (enhanced_speed,
enhanced_altitude) or a reconstructed compressed timestamp. The record size
check now counts only the fields the active definition writes, so a standard
Garmin activity validates with no findings and still re-encodes byte-for-byte,
while a genuinely mismatched definition size is still reported.Two caller-visible consequences: clearing a field after decode (for example
record.heart_rate = None) no longer trips the WIRE size check, because encode
writes the protocol-invalid value at the definition's size; and an Activity
file_idno longer has to carryserial_number, which Garmin's own activity
files omit and which Garmin's FIT documentation marks optional.type,
manufacturerandtime_createdare still required.
Dependencies
- Upgrade the bundled Garmin FIT SDK Profile to 21.222.0. (#88)