Skip to content

Update of Duration recording gpx Fixed#4703

Open
DmitrySvetlichny wants to merge 3 commits intomasterfrom
update_duration_recording
Open

Update of Duration recording gpx Fixed#4703
DmitrySvetlichny wants to merge 3 commits intomasterfrom
update_duration_recording

Conversation

@DmitrySvetlichny
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread Sources/Helpers/OAGPXUIHelper.mm Outdated
+ (long)liveTimeSpanForGpx:(OASGpxFile *)gpx withoutGaps:(BOOL)withoutGaps
{
long totalActiveDuration = 0;
long earliestSegmentStart = LLONG_MAX;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LONG_MAX ?

Comment thread Sources/Helpers/OAGPXUIHelper.mm Outdated
for (OASTrkSegment *segment in track.segments)
{
NSArray<OASWptPt *> *points = segment.points;
if (points.count <= 1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (points.count < 2) {}

Comment thread Sources/Helpers/OAGPXUIHelper.mm Outdated
}
}

if (earliestSegmentStart == LLONG_MAX)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LONG_MAX

((!currentTrack.tracks || currentTrack.tracks.count == 0) || currentTrack.tracks[0].generalTrack);

OASGpxTrackAnalysis *analysis = [currentTrack getAnalysisFileTimestamp:0];
long timeSpan = withoutGaps ? analysis.timeSpanWithoutGaps : analysis.timeSpan;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we have same code in java (android). Why it works correctly in android and wrong in ios?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update of Duration and recording indicator

3 participants