Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Log/LogDownloadMavLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ async Task<string> GetLog(ushort no, string fileName)
dflb.Clear();
GC.Collect();

// rename log is we have a valid gps time
if (logtime != DateTime.MinValue)
// rename log fs we have a valid gps time, logtime is after 1990-01-01, since some GPS does not use Unix epoch for invalid time.
if (logtime.Year >= 1990)
{
string newlogfilename = Settings.Instance.LogDir + Path.DirectorySeparatorChar
+ MainV2.comPort.MAV.aptype.ToString() +
Expand Down Expand Up @@ -402,7 +402,7 @@ private void UpdateProgress(uint min, uint max, uint current)
if (current > 0 && current < max)
{
var per = (current / (double)max) * 100;

var elapsed = DateTime.Now - start;
if (elapsed.TotalSeconds == 0)
elapsed = TimeSpan.FromSeconds(1);
Expand Down
Loading