fit-file-parser 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/binary.js +43 -18
- package/dist/cjs/binary.js +43 -18
- package/dist/cjs/fit.js +23 -2
- package/dist/cjs/fit_types.d.ts +3 -1
- package/dist/fit.js +23 -2
- package/dist/fit_types.d.ts +3 -1
- package/package.json +1 -1
package/dist/binary.js
CHANGED
|
@@ -187,8 +187,23 @@ function convertTo(data, unitsList, unitName) {
|
|
|
187
187
|
const unit = options[unitName];
|
|
188
188
|
return unit ? data * unit.multiplier + unit.offset : data;
|
|
189
189
|
}
|
|
190
|
-
function applyOptions(data, field, options) {
|
|
190
|
+
function applyOptions(data, field, options, fields) {
|
|
191
191
|
switch (field) {
|
|
192
|
+
case 'device_type': {
|
|
193
|
+
const isLocal = fields.source_type === 'local' || fields.source_type === 5;
|
|
194
|
+
const isBLE = fields.source_type === 'bluetooth_low_energy' || fields.source_type === 3 || fields.source_type === 'bluetooth' || fields.source_type === 2;
|
|
195
|
+
const isANT = fields.source_type === 'antplus' || fields.source_type === 1 || fields.source_type === 'ant' || fields.source_type === 0;
|
|
196
|
+
if (isLocal) {
|
|
197
|
+
return FIT.types.local_device_type[data] || data;
|
|
198
|
+
}
|
|
199
|
+
if (isBLE) {
|
|
200
|
+
return FIT.types.ble_device_type[data] || data;
|
|
201
|
+
}
|
|
202
|
+
if (isANT) {
|
|
203
|
+
return FIT.types.antplus_device_type[data] || data;
|
|
204
|
+
}
|
|
205
|
+
return data;
|
|
206
|
+
}
|
|
192
207
|
case 'speed':
|
|
193
208
|
case 'enhanced_speed':
|
|
194
209
|
case 'vertical_speed':
|
|
@@ -332,31 +347,41 @@ export function readRecord(blob, messageTypes, developerFields, startIndex, opti
|
|
|
332
347
|
let readDataFromIndex = startIndex + 1;
|
|
333
348
|
const fields = {};
|
|
334
349
|
const message = getFitMessage(messageType.globalMessageNumber);
|
|
350
|
+
const rawFields = [];
|
|
335
351
|
for (let i = 0; i < messageType.fieldDefs.length; i++) {
|
|
336
352
|
const fDef = messageType.fieldDefs[i];
|
|
337
353
|
const data = readData(blob, fDef, readDataFromIndex, options);
|
|
338
354
|
if (!isInvalidValue(data, fDef.type)) {
|
|
339
|
-
|
|
340
|
-
const field = fDef.name;
|
|
341
|
-
const { type } = fDef;
|
|
342
|
-
const { scale } = fDef;
|
|
343
|
-
const { offset } = fDef;
|
|
344
|
-
fields[fDef.name] = applyOptions(formatByType(data, type, scale, offset), field, options);
|
|
345
|
-
}
|
|
346
|
-
else {
|
|
347
|
-
const { field, type, scale, offset } = message.getAttributes(fDef.fDefNo);
|
|
348
|
-
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
349
|
-
fields[field] = applyOptions(formatByType(data, type, scale, offset), field, options);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (message.name === 'record' && options.elapsedRecordField) {
|
|
353
|
-
fields.elapsed_time = (fields.timestamp - (startDate || 0)) / 1000;
|
|
354
|
-
fields.timer_time = fields.elapsed_time - pausedTime;
|
|
355
|
-
}
|
|
355
|
+
rawFields.push({ fDef, data });
|
|
356
356
|
}
|
|
357
357
|
readDataFromIndex += fDef.size;
|
|
358
358
|
messageSize += fDef.size;
|
|
359
359
|
}
|
|
360
|
+
for (const { fDef, data } of rawFields) {
|
|
361
|
+
const { field } = fDef.isDeveloperField ? { field: fDef.name } : message.getAttributes(fDef.fDefNo);
|
|
362
|
+
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
363
|
+
fields[field] = data;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
for (const { fDef, data } of rawFields) {
|
|
367
|
+
if (fDef.isDeveloperField) {
|
|
368
|
+
const field = fDef.name;
|
|
369
|
+
const { type } = fDef;
|
|
370
|
+
const { scale } = fDef;
|
|
371
|
+
const { offset } = fDef;
|
|
372
|
+
fields[fDef.name] = applyOptions(formatByType(data, type, scale, offset), field, options, fields);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
const { field, type, scale, offset } = message.getAttributes(fDef.fDefNo);
|
|
376
|
+
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
377
|
+
fields[field] = applyOptions(formatByType(data, type, scale, offset), field, options, fields);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
if (message.name === 'record' && options.elapsedRecordField) {
|
|
381
|
+
fields.elapsed_time = (fields.timestamp - (startDate || 0)) / 1000;
|
|
382
|
+
fields.timer_time = fields.elapsed_time - pausedTime;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
360
385
|
if (message.name === 'field_description') {
|
|
361
386
|
developerFields[fields.developer_data_index]
|
|
362
387
|
= developerFields[fields.developer_data_index] || [];
|
package/dist/cjs/binary.js
CHANGED
|
@@ -193,8 +193,23 @@ function convertTo(data, unitsList, unitName) {
|
|
|
193
193
|
const unit = options[unitName];
|
|
194
194
|
return unit ? data * unit.multiplier + unit.offset : data;
|
|
195
195
|
}
|
|
196
|
-
function applyOptions(data, field, options) {
|
|
196
|
+
function applyOptions(data, field, options, fields) {
|
|
197
197
|
switch (field) {
|
|
198
|
+
case 'device_type': {
|
|
199
|
+
const isLocal = fields.source_type === 'local' || fields.source_type === 5;
|
|
200
|
+
const isBLE = fields.source_type === 'bluetooth_low_energy' || fields.source_type === 3 || fields.source_type === 'bluetooth' || fields.source_type === 2;
|
|
201
|
+
const isANT = fields.source_type === 'antplus' || fields.source_type === 1 || fields.source_type === 'ant' || fields.source_type === 0;
|
|
202
|
+
if (isLocal) {
|
|
203
|
+
return fit_js_1.FIT.types.local_device_type[data] || data;
|
|
204
|
+
}
|
|
205
|
+
if (isBLE) {
|
|
206
|
+
return fit_js_1.FIT.types.ble_device_type[data] || data;
|
|
207
|
+
}
|
|
208
|
+
if (isANT) {
|
|
209
|
+
return fit_js_1.FIT.types.antplus_device_type[data] || data;
|
|
210
|
+
}
|
|
211
|
+
return data;
|
|
212
|
+
}
|
|
198
213
|
case 'speed':
|
|
199
214
|
case 'enhanced_speed':
|
|
200
215
|
case 'vertical_speed':
|
|
@@ -338,31 +353,41 @@ function readRecord(blob, messageTypes, developerFields, startIndex, options, st
|
|
|
338
353
|
let readDataFromIndex = startIndex + 1;
|
|
339
354
|
const fields = {};
|
|
340
355
|
const message = (0, messages_js_1.getFitMessage)(messageType.globalMessageNumber);
|
|
356
|
+
const rawFields = [];
|
|
341
357
|
for (let i = 0; i < messageType.fieldDefs.length; i++) {
|
|
342
358
|
const fDef = messageType.fieldDefs[i];
|
|
343
359
|
const data = readData(blob, fDef, readDataFromIndex, options);
|
|
344
360
|
if (!isInvalidValue(data, fDef.type)) {
|
|
345
|
-
|
|
346
|
-
const field = fDef.name;
|
|
347
|
-
const { type } = fDef;
|
|
348
|
-
const { scale } = fDef;
|
|
349
|
-
const { offset } = fDef;
|
|
350
|
-
fields[fDef.name] = applyOptions(formatByType(data, type, scale, offset), field, options);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
const { field, type, scale, offset } = message.getAttributes(fDef.fDefNo);
|
|
354
|
-
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
355
|
-
fields[field] = applyOptions(formatByType(data, type, scale, offset), field, options);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
if (message.name === 'record' && options.elapsedRecordField) {
|
|
359
|
-
fields.elapsed_time = (fields.timestamp - (startDate || 0)) / 1000;
|
|
360
|
-
fields.timer_time = fields.elapsed_time - pausedTime;
|
|
361
|
-
}
|
|
361
|
+
rawFields.push({ fDef, data });
|
|
362
362
|
}
|
|
363
363
|
readDataFromIndex += fDef.size;
|
|
364
364
|
messageSize += fDef.size;
|
|
365
365
|
}
|
|
366
|
+
for (const { fDef, data } of rawFields) {
|
|
367
|
+
const { field } = fDef.isDeveloperField ? { field: fDef.name } : message.getAttributes(fDef.fDefNo);
|
|
368
|
+
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
369
|
+
fields[field] = data;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
for (const { fDef, data } of rawFields) {
|
|
373
|
+
if (fDef.isDeveloperField) {
|
|
374
|
+
const field = fDef.name;
|
|
375
|
+
const { type } = fDef;
|
|
376
|
+
const { scale } = fDef;
|
|
377
|
+
const { offset } = fDef;
|
|
378
|
+
fields[fDef.name] = applyOptions(formatByType(data, type, scale, offset), field, options, fields);
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
381
|
+
const { field, type, scale, offset } = message.getAttributes(fDef.fDefNo);
|
|
382
|
+
if (field !== 'unknown' && field !== '' && field !== undefined) {
|
|
383
|
+
fields[field] = applyOptions(formatByType(data, type, scale, offset), field, options, fields);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (message.name === 'record' && options.elapsedRecordField) {
|
|
387
|
+
fields.elapsed_time = (fields.timestamp - (startDate || 0)) / 1000;
|
|
388
|
+
fields.timer_time = fields.elapsed_time - pausedTime;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
366
391
|
if (message.name === 'field_description') {
|
|
367
392
|
developerFields[fields.developer_data_index]
|
|
368
393
|
= developerFields[fields.developer_data_index] || [];
|
package/dist/cjs/fit.js
CHANGED
|
@@ -3106,7 +3106,7 @@ exports.FIT = {
|
|
|
3106
3106
|
},
|
|
3107
3107
|
1: {
|
|
3108
3108
|
field: 'device_type',
|
|
3109
|
-
type: '
|
|
3109
|
+
type: 'uint8',
|
|
3110
3110
|
scale: null,
|
|
3111
3111
|
offset: 0,
|
|
3112
3112
|
units: '',
|
|
@@ -5978,7 +5978,6 @@ exports.FIT = {
|
|
|
5978
5978
|
65534: 'connect',
|
|
5979
5979
|
},
|
|
5980
5980
|
antplus_device_type: {
|
|
5981
|
-
0: 0,
|
|
5982
5981
|
1: 'antfs',
|
|
5983
5982
|
11: 'bike_power',
|
|
5984
5983
|
12: 'environment_sensor_legacy',
|
|
@@ -5992,10 +5991,12 @@ exports.FIT = {
|
|
|
5992
5991
|
26: 'racquet',
|
|
5993
5992
|
27: 'control_hub',
|
|
5994
5993
|
31: 'muscle_oxygen',
|
|
5994
|
+
34: 'shifting',
|
|
5995
5995
|
35: 'bike_light_main',
|
|
5996
5996
|
36: 'bike_light_shared',
|
|
5997
5997
|
38: 'exd',
|
|
5998
5998
|
40: 'bike_radar',
|
|
5999
|
+
46: 'bike_aero',
|
|
5999
6000
|
119: 'weight_scale',
|
|
6000
6001
|
120: 'heart_rate',
|
|
6001
6002
|
121: 'bike_speed_cadence',
|
|
@@ -6003,6 +6004,26 @@ exports.FIT = {
|
|
|
6003
6004
|
123: 'bike_speed',
|
|
6004
6005
|
124: 'stride_speed_distance',
|
|
6005
6006
|
},
|
|
6007
|
+
local_device_type: {
|
|
6008
|
+
0: 'gps',
|
|
6009
|
+
1: 'glonass',
|
|
6010
|
+
2: 'gps_glonass',
|
|
6011
|
+
3: 'accelerometer',
|
|
6012
|
+
4: 'barometer',
|
|
6013
|
+
5: 'temperature',
|
|
6014
|
+
10: 'whr',
|
|
6015
|
+
12: 'sensor_hub',
|
|
6016
|
+
},
|
|
6017
|
+
ble_device_type: {
|
|
6018
|
+
0: 'connected_gps',
|
|
6019
|
+
1: 'heart_rate',
|
|
6020
|
+
2: 'bike_power',
|
|
6021
|
+
3: 'bike_speed_cadence',
|
|
6022
|
+
4: 'bike_speed',
|
|
6023
|
+
5: 'bike_cadence',
|
|
6024
|
+
6: 'footpod',
|
|
6025
|
+
7: 'bike_trainer',
|
|
6026
|
+
},
|
|
6006
6027
|
ant_network: {
|
|
6007
6028
|
0: 'public',
|
|
6008
6029
|
1: 'antplus',
|
package/dist/cjs/fit_types.d.ts
CHANGED
|
@@ -72,7 +72,9 @@ export type Schedule = 'workout' | 'course';
|
|
|
72
72
|
export type CoursePoint = 'generic' | 'summit' | 'valley' | 'water' | 'food' | 'danger' | 'left' | 'right' | 'straight' | 'first_aid' | 'fourth_category' | 'third_category' | 'second_category' | 'first_category' | 'hors_category' | 'sprint' | 'left_fork' | 'right_fork' | 'middle_fork' | 'slight_left' | 'sharp_left' | 'slight_right' | 'sharp_right' | 'u_turn' | 'segment_start' | 'segment_end';
|
|
73
73
|
export type Manufacturer = '0' | 'garmin' | 'garmin_fr405_antfs' | 'zephyr' | 'dayton' | 'idt' | 'srm' | 'quarq' | 'ibike' | 'saris' | 'spark_hk' | 'tanita' | 'echowell' | 'dynastream_oem' | 'nautilus' | 'dynastream' | 'timex' | 'metrigear' | 'xelic' | 'beurer' | 'cardiosport' | 'a_and_d' | 'hmm' | 'suunto' | 'thita_elektronik' | 'gpulse' | 'clean_mobile' | 'pedal_brain' | 'peaksware' | 'saxonar' | 'lemond_fitness' | 'dexcom' | 'wahoo_fitness' | 'octane_fitness' | 'archinoetics' | 'the_hurt_box' | 'citizen_systems' | 'magellan' | 'osynce' | 'holux' | 'concept2' | 'one_giant_leap' | 'ace_sensor' | 'brim_brothers' | 'xplova' | 'perception_digital' | 'bf1systems' | 'pioneer' | 'spantec' | 'metalogics' | '4iiiis' | 'seiko_epson' | 'seiko_epson_oem' | 'ifor_powell' | 'maxwell_guider' | 'star_trac' | 'breakaway' | 'alatech_technology_ltd' | 'mio_technology_europe' | 'rotor' | 'geonaute' | 'id_bike' | 'specialized' | 'wtek' | 'physical_enterprises' | 'north_pole_engineering' | 'bkool' | 'cateye' | 'stages_cycling' | 'sigmasport' | 'tomtom' | 'peripedal' | 'wattbike' | 'moxy' | 'ciclosport' | 'powerbahn' | 'acorn_projects_aps' | 'lifebeam' | 'bontrager' | 'wellgo' | 'scosche' | 'magura' | 'woodway' | 'elite' | 'nielsen_kellerman' | 'dk_city' | 'tacx' | 'direction_technology' | 'magtonic' | '1partcarbon' | 'inside_ride_technologies' | 'sound_of_motion' | 'stryd' | 'icg' | 'mipulse' | 'bsx_athletics' | 'look' | 'campagnolo_srl' | 'body_bike_smart' | 'praxisworks' | 'limits_technology' | 'topaction_technology' | 'cosinuss' | 'fitcare' | 'magene' | 'giant_manufacturing_co' | 'tigrasport' | 'salutron' | 'technogym' | 'bryton_sensors' | 'latitude_limited' | 'soaring_technology' | 'igpsport' | 'thinkrider' | 'gopher_sport' | 'waterrower' | 'orangetheory' | 'inpeak' | 'kinetic' | 'johnson_health_tech' | 'polar_electro' | 'seesense' | 'nci_technology' | 'development' | 'healthandlife' | 'lezyne' | 'scribe_labs' | 'zwift' | 'watteam' | 'recon' | 'favero_electronics' | 'dynovelo' | 'strava' | 'precor' | 'bryton' | 'sram' | 'navman' | 'cobi' | 'spivi' | 'mio_magellan' | 'evesports' | 'sensitivus_gauge' | 'podoon' | 'life_time_fitness' | 'falco_e_motors' | 'minoura' | 'cycliq' | 'luxottica' | 'trainer_road' | 'the_sufferfest' | 'fullspeedahead' | 'virtualtraining' | 'feedbacksports' | 'omata' | 'vdo' | 'magneticdays' | 'hammerhead' | 'kinetic_by_kurt' | 'shapelog' | 'dabuziduo' | 'jetblack' | 'coros' | 'virtugo' | 'velosense' | 'actigraphcorp';
|
|
74
74
|
export type GarminProduct = 'hrm_bike' | 'hrm1' | 'axh01' | 'axb01' | 'axb02' | 'hrm2ss' | 'dsi_alf02' | 'hrm3ss' | 'hrm_run_single_byte_product_id' | 'bsm' | 'bcm' | 'axs01' | 'hrm_tri_single_byte_product_id' | 'fr225_single_byte_product_id' | 'fr301_china' | 'fr301_japan' | 'fr301_korea' | 'fr301_taiwan' | 'fr405' | 'fr50' | 'fr405_japan' | 'fr60' | 'dsi_alf01' | 'fr310xt' | 'edge500' | 'fr110' | 'edge800' | 'edge500_taiwan' | 'edge500_japan' | 'chirp' | 'fr110_japan' | 'edge200' | 'fr910xt' | 'edge800_taiwan' | 'edge800_japan' | 'alf04' | 'fr610' | 'fr210_japan' | 'vector_ss' | 'vector_cp' | 'edge800_china' | 'edge500_china' | 'fr610_japan' | 'edge500_korea' | 'fr70' | 'fr310xt_4t' | 'amx' | 'fr10' | 'edge800_korea' | 'swim' | 'fr910xt_china' | 'fenix' | 'edge200_taiwan' | 'edge510' | 'edge810' | 'tempe' | 'fr910xt_japan' | 'fr620' | 'fr220' | 'fr910xt_korea' | 'fr10_japan' | 'edge810_japan' | 'virb_elite' | 'edge_touring' | 'edge510_japan' | 'hrm_tri' | 'hrm_run' | 'fr920xt' | 'edge510_asia' | 'edge810_china' | 'edge810_taiwan' | 'edge1000' | 'vivo_fit' | 'virb_remote' | 'vivo_ki' | 'fr15' | 'vivo_active' | 'edge510_korea' | 'fr620_japan' | 'fr620_china' | 'fr220_japan' | 'fr220_china' | 'approach_s6' | 'vivo_smart' | 'fenix2' | 'epix' | 'fenix3' | 'edge1000_taiwan' | 'edge1000_japan' | 'fr15_japan' | 'edge520' | 'edge1000_china' | 'fr620_russia' | 'fr220_russia' | 'vector_s' | 'edge1000_korea' | 'fr920xt_taiwan' | 'fr920xt_china' | 'fr920xt_japan' | 'virbx' | 'vivo_smart_apac' | 'etrex_touch' | 'edge25' | 'fr25' | 'vivo_fit2' | 'fr225' | 'fr630' | 'fr230' | 'fr735xt' | 'vivo_active_apac' | 'vector_2' | 'vector_2s' | 'virbxe' | 'fr620_taiwan' | 'fr220_taiwan' | 'truswing' | 'fenix3_china' | 'fenix3_twn' | 'varia_headlight' | 'varia_taillight_old' | 'edge_explore_1000' | 'fr225_asia' | 'varia_radar_taillight' | 'varia_radar_display' | 'edge20' | 'd2_bravo' | 'approach_s20' | 'varia_remote' | 'hrm4_run' | 'vivo_active_hr' | 'vivo_smart_hr' | 'vivo_move' | 'varia_vision' | 'vivo_fit3' | 'fenix3_hr' | 'virb_ultra_30' | 'index_smart_scale' | 'fr235' | 'fenix3_chronos' | 'oregon7xx' | 'rino7xx' | 'nautix' | 'edge_820' | 'edge_explore_820' | 'fenix5s' | 'd2_bravo_titanium' | 'varia_ut800' | 'running_dynamics_pod' | 'fenix5x' | 'vivo_fit_jr' | 'fr935' | 'fenix5' | 'descent' | 'sdm4' | 'edge_remote' | 'training_center' | 'connectiq_simulator' | 'android_antplus_plugin' | 'connect';
|
|
75
|
-
export type AntplusDeviceType = '0' | 'antfs' | 'bike_power' | 'environment_sensor_legacy' | 'multi_sport_speed_distance' | 'control' | 'fitness_equipment' | 'blood_pressure' | 'geocache_node' | 'light_electric_vehicle' | 'env_sensor' | 'racquet' | 'control_hub' | 'muscle_oxygen' | 'bike_light_main' | 'bike_light_shared' | 'exd' | 'bike_radar' | 'weight_scale' | 'heart_rate' | 'bike_speed_cadence' | 'bike_cadence' | 'bike_speed' | 'stride_speed_distance';
|
|
75
|
+
export type AntplusDeviceType = '0' | 'antfs' | 'bike_power' | 'environment_sensor_legacy' | 'multi_sport_speed_distance' | 'control' | 'fitness_equipment' | 'blood_pressure' | 'geocache_node' | 'light_electric_vehicle' | 'env_sensor' | 'racquet' | 'control_hub' | 'muscle_oxygen' | 'shifting' | 'bike_light_main' | 'bike_light_shared' | 'exd' | 'bike_radar' | 'weight_scale' | 'heart_rate' | 'bike_speed_cadence' | 'bike_cadence' | 'bike_speed' | 'stride_speed_distance';
|
|
76
|
+
export type LocalDeviceType = 'gps' | 'glonass' | 'beidou' | 'galileo' | 'waas_egnos' | 'local' | 'barometer' | 'accelerometer' | 'gyroscope' | 'compass';
|
|
77
|
+
export type BleDeviceType = '0' | 'heart_rate' | 'cycling_speed_cadence' | 'cycling_power';
|
|
76
78
|
export type AntNetwork = 'public' | 'antplus' | 'antfs' | 'private';
|
|
77
79
|
export type WorkoutCapabilities = '0' | 'interval' | 'custom' | 'fitness_equipment' | 'firstbeat' | 'new_leaf' | 'tcx' | 'speed' | 'heart_rate' | 'distance' | 'cadence' | 'power' | 'grade' | 'resistance' | 'protected';
|
|
78
80
|
export type BatteryStatus = '0' | 'new' | 'good' | 'ok' | 'low' | 'critical' | 'charging' | 'unknown';
|
package/dist/fit.js
CHANGED
|
@@ -3103,7 +3103,7 @@ export const FIT = {
|
|
|
3103
3103
|
},
|
|
3104
3104
|
1: {
|
|
3105
3105
|
field: 'device_type',
|
|
3106
|
-
type: '
|
|
3106
|
+
type: 'uint8',
|
|
3107
3107
|
scale: null,
|
|
3108
3108
|
offset: 0,
|
|
3109
3109
|
units: '',
|
|
@@ -5975,7 +5975,6 @@ export const FIT = {
|
|
|
5975
5975
|
65534: 'connect',
|
|
5976
5976
|
},
|
|
5977
5977
|
antplus_device_type: {
|
|
5978
|
-
0: 0,
|
|
5979
5978
|
1: 'antfs',
|
|
5980
5979
|
11: 'bike_power',
|
|
5981
5980
|
12: 'environment_sensor_legacy',
|
|
@@ -5989,10 +5988,12 @@ export const FIT = {
|
|
|
5989
5988
|
26: 'racquet',
|
|
5990
5989
|
27: 'control_hub',
|
|
5991
5990
|
31: 'muscle_oxygen',
|
|
5991
|
+
34: 'shifting',
|
|
5992
5992
|
35: 'bike_light_main',
|
|
5993
5993
|
36: 'bike_light_shared',
|
|
5994
5994
|
38: 'exd',
|
|
5995
5995
|
40: 'bike_radar',
|
|
5996
|
+
46: 'bike_aero',
|
|
5996
5997
|
119: 'weight_scale',
|
|
5997
5998
|
120: 'heart_rate',
|
|
5998
5999
|
121: 'bike_speed_cadence',
|
|
@@ -6000,6 +6001,26 @@ export const FIT = {
|
|
|
6000
6001
|
123: 'bike_speed',
|
|
6001
6002
|
124: 'stride_speed_distance',
|
|
6002
6003
|
},
|
|
6004
|
+
local_device_type: {
|
|
6005
|
+
0: 'gps',
|
|
6006
|
+
1: 'glonass',
|
|
6007
|
+
2: 'gps_glonass',
|
|
6008
|
+
3: 'accelerometer',
|
|
6009
|
+
4: 'barometer',
|
|
6010
|
+
5: 'temperature',
|
|
6011
|
+
10: 'whr',
|
|
6012
|
+
12: 'sensor_hub',
|
|
6013
|
+
},
|
|
6014
|
+
ble_device_type: {
|
|
6015
|
+
0: 'connected_gps',
|
|
6016
|
+
1: 'heart_rate',
|
|
6017
|
+
2: 'bike_power',
|
|
6018
|
+
3: 'bike_speed_cadence',
|
|
6019
|
+
4: 'bike_speed',
|
|
6020
|
+
5: 'bike_cadence',
|
|
6021
|
+
6: 'footpod',
|
|
6022
|
+
7: 'bike_trainer',
|
|
6023
|
+
},
|
|
6003
6024
|
ant_network: {
|
|
6004
6025
|
0: 'public',
|
|
6005
6026
|
1: 'antplus',
|
package/dist/fit_types.d.ts
CHANGED
|
@@ -72,7 +72,9 @@ export type Schedule = 'workout' | 'course';
|
|
|
72
72
|
export type CoursePoint = 'generic' | 'summit' | 'valley' | 'water' | 'food' | 'danger' | 'left' | 'right' | 'straight' | 'first_aid' | 'fourth_category' | 'third_category' | 'second_category' | 'first_category' | 'hors_category' | 'sprint' | 'left_fork' | 'right_fork' | 'middle_fork' | 'slight_left' | 'sharp_left' | 'slight_right' | 'sharp_right' | 'u_turn' | 'segment_start' | 'segment_end';
|
|
73
73
|
export type Manufacturer = '0' | 'garmin' | 'garmin_fr405_antfs' | 'zephyr' | 'dayton' | 'idt' | 'srm' | 'quarq' | 'ibike' | 'saris' | 'spark_hk' | 'tanita' | 'echowell' | 'dynastream_oem' | 'nautilus' | 'dynastream' | 'timex' | 'metrigear' | 'xelic' | 'beurer' | 'cardiosport' | 'a_and_d' | 'hmm' | 'suunto' | 'thita_elektronik' | 'gpulse' | 'clean_mobile' | 'pedal_brain' | 'peaksware' | 'saxonar' | 'lemond_fitness' | 'dexcom' | 'wahoo_fitness' | 'octane_fitness' | 'archinoetics' | 'the_hurt_box' | 'citizen_systems' | 'magellan' | 'osynce' | 'holux' | 'concept2' | 'one_giant_leap' | 'ace_sensor' | 'brim_brothers' | 'xplova' | 'perception_digital' | 'bf1systems' | 'pioneer' | 'spantec' | 'metalogics' | '4iiiis' | 'seiko_epson' | 'seiko_epson_oem' | 'ifor_powell' | 'maxwell_guider' | 'star_trac' | 'breakaway' | 'alatech_technology_ltd' | 'mio_technology_europe' | 'rotor' | 'geonaute' | 'id_bike' | 'specialized' | 'wtek' | 'physical_enterprises' | 'north_pole_engineering' | 'bkool' | 'cateye' | 'stages_cycling' | 'sigmasport' | 'tomtom' | 'peripedal' | 'wattbike' | 'moxy' | 'ciclosport' | 'powerbahn' | 'acorn_projects_aps' | 'lifebeam' | 'bontrager' | 'wellgo' | 'scosche' | 'magura' | 'woodway' | 'elite' | 'nielsen_kellerman' | 'dk_city' | 'tacx' | 'direction_technology' | 'magtonic' | '1partcarbon' | 'inside_ride_technologies' | 'sound_of_motion' | 'stryd' | 'icg' | 'mipulse' | 'bsx_athletics' | 'look' | 'campagnolo_srl' | 'body_bike_smart' | 'praxisworks' | 'limits_technology' | 'topaction_technology' | 'cosinuss' | 'fitcare' | 'magene' | 'giant_manufacturing_co' | 'tigrasport' | 'salutron' | 'technogym' | 'bryton_sensors' | 'latitude_limited' | 'soaring_technology' | 'igpsport' | 'thinkrider' | 'gopher_sport' | 'waterrower' | 'orangetheory' | 'inpeak' | 'kinetic' | 'johnson_health_tech' | 'polar_electro' | 'seesense' | 'nci_technology' | 'development' | 'healthandlife' | 'lezyne' | 'scribe_labs' | 'zwift' | 'watteam' | 'recon' | 'favero_electronics' | 'dynovelo' | 'strava' | 'precor' | 'bryton' | 'sram' | 'navman' | 'cobi' | 'spivi' | 'mio_magellan' | 'evesports' | 'sensitivus_gauge' | 'podoon' | 'life_time_fitness' | 'falco_e_motors' | 'minoura' | 'cycliq' | 'luxottica' | 'trainer_road' | 'the_sufferfest' | 'fullspeedahead' | 'virtualtraining' | 'feedbacksports' | 'omata' | 'vdo' | 'magneticdays' | 'hammerhead' | 'kinetic_by_kurt' | 'shapelog' | 'dabuziduo' | 'jetblack' | 'coros' | 'virtugo' | 'velosense' | 'actigraphcorp';
|
|
74
74
|
export type GarminProduct = 'hrm_bike' | 'hrm1' | 'axh01' | 'axb01' | 'axb02' | 'hrm2ss' | 'dsi_alf02' | 'hrm3ss' | 'hrm_run_single_byte_product_id' | 'bsm' | 'bcm' | 'axs01' | 'hrm_tri_single_byte_product_id' | 'fr225_single_byte_product_id' | 'fr301_china' | 'fr301_japan' | 'fr301_korea' | 'fr301_taiwan' | 'fr405' | 'fr50' | 'fr405_japan' | 'fr60' | 'dsi_alf01' | 'fr310xt' | 'edge500' | 'fr110' | 'edge800' | 'edge500_taiwan' | 'edge500_japan' | 'chirp' | 'fr110_japan' | 'edge200' | 'fr910xt' | 'edge800_taiwan' | 'edge800_japan' | 'alf04' | 'fr610' | 'fr210_japan' | 'vector_ss' | 'vector_cp' | 'edge800_china' | 'edge500_china' | 'fr610_japan' | 'edge500_korea' | 'fr70' | 'fr310xt_4t' | 'amx' | 'fr10' | 'edge800_korea' | 'swim' | 'fr910xt_china' | 'fenix' | 'edge200_taiwan' | 'edge510' | 'edge810' | 'tempe' | 'fr910xt_japan' | 'fr620' | 'fr220' | 'fr910xt_korea' | 'fr10_japan' | 'edge810_japan' | 'virb_elite' | 'edge_touring' | 'edge510_japan' | 'hrm_tri' | 'hrm_run' | 'fr920xt' | 'edge510_asia' | 'edge810_china' | 'edge810_taiwan' | 'edge1000' | 'vivo_fit' | 'virb_remote' | 'vivo_ki' | 'fr15' | 'vivo_active' | 'edge510_korea' | 'fr620_japan' | 'fr620_china' | 'fr220_japan' | 'fr220_china' | 'approach_s6' | 'vivo_smart' | 'fenix2' | 'epix' | 'fenix3' | 'edge1000_taiwan' | 'edge1000_japan' | 'fr15_japan' | 'edge520' | 'edge1000_china' | 'fr620_russia' | 'fr220_russia' | 'vector_s' | 'edge1000_korea' | 'fr920xt_taiwan' | 'fr920xt_china' | 'fr920xt_japan' | 'virbx' | 'vivo_smart_apac' | 'etrex_touch' | 'edge25' | 'fr25' | 'vivo_fit2' | 'fr225' | 'fr630' | 'fr230' | 'fr735xt' | 'vivo_active_apac' | 'vector_2' | 'vector_2s' | 'virbxe' | 'fr620_taiwan' | 'fr220_taiwan' | 'truswing' | 'fenix3_china' | 'fenix3_twn' | 'varia_headlight' | 'varia_taillight_old' | 'edge_explore_1000' | 'fr225_asia' | 'varia_radar_taillight' | 'varia_radar_display' | 'edge20' | 'd2_bravo' | 'approach_s20' | 'varia_remote' | 'hrm4_run' | 'vivo_active_hr' | 'vivo_smart_hr' | 'vivo_move' | 'varia_vision' | 'vivo_fit3' | 'fenix3_hr' | 'virb_ultra_30' | 'index_smart_scale' | 'fr235' | 'fenix3_chronos' | 'oregon7xx' | 'rino7xx' | 'nautix' | 'edge_820' | 'edge_explore_820' | 'fenix5s' | 'd2_bravo_titanium' | 'varia_ut800' | 'running_dynamics_pod' | 'fenix5x' | 'vivo_fit_jr' | 'fr935' | 'fenix5' | 'descent' | 'sdm4' | 'edge_remote' | 'training_center' | 'connectiq_simulator' | 'android_antplus_plugin' | 'connect';
|
|
75
|
-
export type AntplusDeviceType = '0' | 'antfs' | 'bike_power' | 'environment_sensor_legacy' | 'multi_sport_speed_distance' | 'control' | 'fitness_equipment' | 'blood_pressure' | 'geocache_node' | 'light_electric_vehicle' | 'env_sensor' | 'racquet' | 'control_hub' | 'muscle_oxygen' | 'bike_light_main' | 'bike_light_shared' | 'exd' | 'bike_radar' | 'weight_scale' | 'heart_rate' | 'bike_speed_cadence' | 'bike_cadence' | 'bike_speed' | 'stride_speed_distance';
|
|
75
|
+
export type AntplusDeviceType = '0' | 'antfs' | 'bike_power' | 'environment_sensor_legacy' | 'multi_sport_speed_distance' | 'control' | 'fitness_equipment' | 'blood_pressure' | 'geocache_node' | 'light_electric_vehicle' | 'env_sensor' | 'racquet' | 'control_hub' | 'muscle_oxygen' | 'shifting' | 'bike_light_main' | 'bike_light_shared' | 'exd' | 'bike_radar' | 'weight_scale' | 'heart_rate' | 'bike_speed_cadence' | 'bike_cadence' | 'bike_speed' | 'stride_speed_distance';
|
|
76
|
+
export type LocalDeviceType = 'gps' | 'glonass' | 'beidou' | 'galileo' | 'waas_egnos' | 'local' | 'barometer' | 'accelerometer' | 'gyroscope' | 'compass';
|
|
77
|
+
export type BleDeviceType = '0' | 'heart_rate' | 'cycling_speed_cadence' | 'cycling_power';
|
|
76
78
|
export type AntNetwork = 'public' | 'antplus' | 'antfs' | 'private';
|
|
77
79
|
export type WorkoutCapabilities = '0' | 'interval' | 'custom' | 'fitness_equipment' | 'firstbeat' | 'new_leaf' | 'tcx' | 'speed' | 'heart_rate' | 'distance' | 'cadence' | 'power' | 'grade' | 'resistance' | 'protected';
|
|
78
80
|
export type BatteryStatus = '0' | 'new' | 'good' | 'ok' | 'low' | 'critical' | 'charging' | 'unknown';
|