Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<Nullable>disable</Nullable>
<LangVersion>latest</LangVersion>

<VersionPrefix>5.10.0</VersionPrefix>
<BuildIncrement>50</BuildIncrement>
<VersionPrefix>5.10.1</VersionPrefix>
<BuildIncrement>51</BuildIncrement>
<VersionSuffix></VersionSuffix>
<Product>FitEdit</Product>
<Copyright>EnduraByte LLC 2024</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Infrastructure/FitEdit.Adapters.Fit/Decode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ private void ReadDataMesg(Stream fitStream, BinaryReader br, long sourceIndex, b

if (timeTraveled)
{
var dt = new RecordMesg(mesg).GetTimestamp().GetDateTime();
var dt = new RecordMesg(mesg).GetTimestamp()?.GetDateTime();
Log.Warn($"Discarding suspicious message at {dt} with timestamp change of {diff}s");
Log.Debug($"Source data: {string.Join(" ", mesg.SourceData?.Select(b => $"{b:X2}") ?? new List<string>())}");
return;
Expand Down
2 changes: 1 addition & 1 deletion Infrastructure/FitEdit.Adapters.Fit/FitConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DataMessages
public static bool OfLargeSize { get; set; } = false;
public static bool WithLargeLatitudeChange { get; set; } = true;
public static bool WithLargeLongitudeChange { get; set; } = true;
public static bool WithLargeTimestampChange { get; set; } = true;
public static bool WithLargeTimestampChange { get; set; } = false;

/// <summary>
/// Ignore any FileId message other than the first or any FileId message that is not at the beginning of the file.
Expand Down
6 changes: 2 additions & 4 deletions Infrastructure/FitEdit.Data/Fit/FitFileExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,13 @@ public static FitFile ApplySpeeds(this FitFile fitFile, Dictionary<int, Speed> l
merged.Append(file);
}

var activityMesg = merged.FindFirst<ActivityMesg>();
DateTime firstActivityTime = activityMesg?.GetTimestamp().GetDateTime() ?? default;

merged.BackfillEvents();

merged.RemoveNonfirst(typeof(FileIdMesg));
merged.RemoveNonfirst(typeof(FileCreatorMesg));
merged.RemoveNonfirst(typeof(DeviceSettingsMesg));
merged.RemoveNonfirst(typeof(UserProfileMesg));
merged.RemoveNonfirst(typeof(ActivityMesg));
merged.RemoveAll(typeof(DeviceInfoMesg), after: firstActivityTime);

return merged;
}
Expand Down
2 changes: 1 addition & 1 deletion Ui/FitEdit.Ui.iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>50</string>
<string>51</string>
</dict>
</plist>