Skip to content

Commit 33f4ad9

Browse files
authored
Merge pull request #10 from garmin/production/akw/21.158.0_20
Garmin FIT SDK 21.158.0
2 parents 649fb69 + 8fe812e commit 33f4ad9

File tree

485 files changed

+2126
-980
lines changed

Some content is hidden

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

485 files changed

+2126
-980
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.garmin</groupId>
77
<artifactId>fit</artifactId>
8-
<version>21.141.0</version>
8+
<version>21.158.0</version>
99
<packaging>jar</packaging>
1010
<name>FIT SDK</name>
1111
<description>The Official Garmin FIT SDK</description>

src/main/com/garmin/fit/AadAccelFeaturesMesg.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/AadAccelFeaturesMesgListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/AccelerometerDataMesg.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/AccelerometerDataMesgListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/////////////////////////////////////////////////////////////////////////////////////////////
2+
// Copyright 2024 Garmin International, Inc.
3+
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
4+
// may not use this file except in compliance with the Flexible and Interoperable Data
5+
// Transfer (FIT) Protocol License.
6+
/////////////////////////////////////////////////////////////////////////////////////////////
7+
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
10+
/////////////////////////////////////////////////////////////////////////////////////////////
11+
12+
13+
package com.garmin.fit;
14+
15+
import java.util.ArrayList;
16+
17+
class Accumulator {
18+
// Index by Mesg# and DestField#
19+
ArrayList<AccumulatedField> accumulatedFields;
20+
21+
Accumulator() {
22+
accumulatedFields = new ArrayList<AccumulatedField>();
23+
}
24+
25+
public void set(int mesgNum, int destFieldNum, long value) {
26+
AccumulatedField accumField = null;
27+
int i;
28+
29+
for (i = 0; i < accumulatedFields.size(); i++) {
30+
accumField = accumulatedFields.get(i);
31+
32+
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum)) {
33+
break;
34+
}
35+
}
36+
37+
if (i == accumulatedFields.size()) {
38+
accumField = new AccumulatedField(mesgNum, destFieldNum);
39+
accumulatedFields.add(accumField);
40+
}
41+
42+
accumField.set(value);
43+
}
44+
45+
public long accumulate(int mesgNum, int destFieldNum, long value, int bits) {
46+
AccumulatedField accumField = null;
47+
int i;
48+
49+
for (i = 0; i < accumulatedFields.size(); i++) {
50+
accumField = accumulatedFields.get(i);
51+
52+
if ((accumField.mesgNum == mesgNum) && (accumField.destFieldNum == destFieldNum)) {
53+
break;
54+
}
55+
}
56+
57+
if (i == accumulatedFields.size()) {
58+
accumField = new AccumulatedField(mesgNum, destFieldNum);
59+
accumulatedFields.add(accumField);
60+
}
61+
62+
return accumField.accumulate(value, bits);
63+
64+
}
65+
66+
private class AccumulatedField {
67+
int mesgNum;
68+
int destFieldNum; //Field# to accumulate into
69+
long lastValue;
70+
long accumulatedValue;
71+
72+
AccumulatedField(int mesgNum, int destFieldNum) {
73+
this.mesgNum = mesgNum;
74+
this.destFieldNum = destFieldNum;
75+
this.lastValue = 0;
76+
this.accumulatedValue = 0;
77+
}
78+
79+
public long accumulate(long value, int bits) {
80+
long mask = ((long) 1 << bits) - 1;
81+
82+
accumulatedValue += (value - lastValue) & mask;
83+
lastValue = value;
84+
85+
return accumulatedValue;
86+
}
87+
88+
public long set(long value) {
89+
accumulatedValue = value;
90+
this.lastValue = value;
91+
return accumulatedValue;
92+
}
93+
}
94+
}

src/main/com/garmin/fit/Activity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/ActivityClass.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/ActivityLevel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

src/main/com/garmin/fit/ActivityMesg.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Transfer (FIT) Protocol License.
66
/////////////////////////////////////////////////////////////////////////////////////////////
77
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
8-
// Profile Version = 21.141.0Release
9-
// Tag = production/release/21.141.0-0-g2aa27e1
8+
// Profile Version = 21.158.0Release
9+
// Tag = production/release/21.158.0-0-gc9428aa
1010
/////////////////////////////////////////////////////////////////////////////////////////////
1111

1212

0 commit comments

Comments
 (0)