Skip to content

Commit 497ddcd

Browse files
authored
Garmin FIT SDK 21.194.0
1 parent f525048 commit 497ddcd

File tree

384 files changed

+70302
-94055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

384 files changed

+70302
-94055
lines changed

Dynastream/Fit/AccumulatedField.cs

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
#region Copyright
2-
/////////////////////////////////////////////////////////////////////////////////////////////
3-
// Copyright 2025 Garmin International, Inc.
4-
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
5-
// may not use this file except in compliance with the Flexible and Interoperable Data
6-
// Transfer (FIT) Protocol License.
7-
/////////////////////////////////////////////////////////////////////////////////////////////
8-
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
9-
// Profile Version = 21.188.0Release
10-
// Tag = production/release/21.188.0-0-g55050f8
11-
/////////////////////////////////////////////////////////////////////////////////////////////
12-
13-
#endregion
14-
15-
using System;
16-
using System.Collections.Generic;
17-
using System.Linq;
18-
using System.Text;
19-
20-
namespace Dynastream.Fit
21-
{
22-
public class AccumulatedField
23-
{
24-
public int mesgNum;
25-
public int destFieldNum;
26-
private long lastValue;
27-
private long accumulatedValue;
28-
29-
public AccumulatedField(int mesgNum, int destFieldNum)
30-
{
31-
this.mesgNum = mesgNum;
32-
this.destFieldNum = destFieldNum;
33-
this.lastValue = 0;
34-
this.accumulatedValue = 0;
35-
}
36-
37-
public long Accumulate(long value, int bits)
38-
{
39-
long mask = (1L << bits) - 1;
40-
41-
accumulatedValue += (value - lastValue) & mask;
42-
lastValue = value;
43-
44-
return accumulatedValue;
45-
}
46-
47-
public long Set(long value)
48-
{
49-
accumulatedValue = value;
50-
this.lastValue = value;
51-
return accumulatedValue;
52-
}
53-
}
54-
}
1+
#region Copyright
2+
/////////////////////////////////////////////////////////////////////////////////////////////
3+
// Copyright 2026 Garmin International, Inc.
4+
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
5+
// may not use this file except in compliance with the Flexible and Interoperable Data
6+
// Transfer (FIT) Protocol License.
7+
/////////////////////////////////////////////////////////////////////////////////////////////
8+
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
9+
// Profile Version = 21.194.0Release
10+
// Tag = production/release/21.194.0-0-g65135fc
11+
/////////////////////////////////////////////////////////////////////////////////////////////
12+
13+
#endregion
14+
15+
using System;
16+
using System.Collections.Generic;
17+
using System.Linq;
18+
using System.Text;
19+
20+
namespace Dynastream.Fit
21+
{
22+
public class AccumulatedField
23+
{
24+
public int mesgNum;
25+
public int destFieldNum;
26+
private long lastValue;
27+
private long accumulatedValue;
28+
29+
public AccumulatedField(int mesgNum, int destFieldNum)
30+
{
31+
this.mesgNum = mesgNum;
32+
this.destFieldNum = destFieldNum;
33+
this.lastValue = 0;
34+
this.accumulatedValue = 0;
35+
}
36+
37+
public long Accumulate(long value, int bits)
38+
{
39+
long mask = (1L << bits) - 1;
40+
41+
accumulatedValue += (value - lastValue) & mask;
42+
lastValue = value;
43+
44+
return accumulatedValue;
45+
}
46+
47+
public long Set(long value)
48+
{
49+
accumulatedValue = value;
50+
this.lastValue = value;
51+
return accumulatedValue;
52+
}
53+
}
54+
}

Dynastream/Fit/Accumulator.cs

Lines changed: 74 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,74 @@
1-
#region Copyright
2-
/////////////////////////////////////////////////////////////////////////////////////////////
3-
// Copyright 2025 Garmin International, Inc.
4-
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
5-
// may not use this file except in compliance with the Flexible and Interoperable Data
6-
// Transfer (FIT) Protocol License.
7-
/////////////////////////////////////////////////////////////////////////////////////////////
8-
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
9-
// Profile Version = 21.188.0Release
10-
// Tag = production/release/21.188.0-0-g55050f8
11-
/////////////////////////////////////////////////////////////////////////////////////////////
12-
13-
#endregion
14-
15-
using System;
16-
using System.Collections.Generic;
17-
using System.Linq;
18-
using System.Text;
19-
20-
namespace Dynastream.Fit
21-
{
22-
public class Accumulator
23-
{
24-
List<AccumulatedField> accumulatedFields;
25-
26-
public Accumulator()
27-
{
28-
accumulatedFields = new List<AccumulatedField>();
29-
}
30-
31-
public void Set(int mesgNum, int destFieldNum, long value)
32-
{
33-
AccumulatedField accumField = null;
34-
int i;
35-
36-
for (i = 0; i < accumulatedFields.Count; i++)
37-
{
38-
accumField = accumulatedFields[i];
39-
40-
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
41-
break;
42-
}
43-
44-
if (i == accumulatedFields.Count)
45-
{
46-
accumField = new AccumulatedField(mesgNum, destFieldNum);
47-
accumulatedFields.Add(accumField);
48-
}
49-
50-
accumField.Set(value);
51-
}
52-
53-
public long Accumulate(int mesgNum, int destFieldNum, long value, int bits)
54-
{
55-
AccumulatedField accumField = null;
56-
int i;
57-
for (i = 0; i < accumulatedFields.Count; i++)
58-
{
59-
accumField = accumulatedFields[i];
60-
61-
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
62-
break;
63-
}
64-
65-
if (i == accumulatedFields.Count)
66-
{
67-
accumField = new AccumulatedField(mesgNum, destFieldNum);
68-
accumulatedFields.Add(accumField);
69-
}
70-
71-
return accumField.Accumulate(value, bits);
72-
}
73-
}
74-
}
1+
#region Copyright
2+
/////////////////////////////////////////////////////////////////////////////////////////////
3+
// Copyright 2026 Garmin International, Inc.
4+
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
5+
// may not use this file except in compliance with the Flexible and Interoperable Data
6+
// Transfer (FIT) Protocol License.
7+
/////////////////////////////////////////////////////////////////////////////////////////////
8+
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
9+
// Profile Version = 21.194.0Release
10+
// Tag = production/release/21.194.0-0-g65135fc
11+
/////////////////////////////////////////////////////////////////////////////////////////////
12+
13+
#endregion
14+
15+
using System;
16+
using System.Collections.Generic;
17+
using System.Linq;
18+
using System.Text;
19+
20+
namespace Dynastream.Fit
21+
{
22+
public class Accumulator
23+
{
24+
List<AccumulatedField> accumulatedFields;
25+
26+
public Accumulator()
27+
{
28+
accumulatedFields = new List<AccumulatedField>();
29+
}
30+
31+
public void Set(int mesgNum, int destFieldNum, long value)
32+
{
33+
AccumulatedField accumField = null;
34+
int i;
35+
36+
for (i = 0; i < accumulatedFields.Count; i++)
37+
{
38+
accumField = accumulatedFields[i];
39+
40+
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
41+
break;
42+
}
43+
44+
if (i == accumulatedFields.Count)
45+
{
46+
accumField = new AccumulatedField(mesgNum, destFieldNum);
47+
accumulatedFields.Add(accumField);
48+
}
49+
50+
accumField.Set(value);
51+
}
52+
53+
public long Accumulate(int mesgNum, int destFieldNum, long value, int bits)
54+
{
55+
AccumulatedField accumField = null;
56+
int i;
57+
for (i = 0; i < accumulatedFields.Count; i++)
58+
{
59+
accumField = accumulatedFields[i];
60+
61+
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum))
62+
break;
63+
}
64+
65+
if (i == accumulatedFields.Count)
66+
{
67+
accumField = new AccumulatedField(mesgNum, destFieldNum);
68+
accumulatedFields.Add(accumField);
69+
}
70+
71+
return accumField.Accumulate(value, bits);
72+
}
73+
}
74+
}

0 commit comments

Comments
 (0)