Skip to content

Commit

Permalink
New FIT devices, manufacturer and types from FitSDK 21.8
Browse files Browse the repository at this point in the history
and forum contributions
  • Loading branch information
amtriathlon committed Jul 29, 2022
1 parent 0e22bd8 commit 8dcd869
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/FileIO/FitRideFile.cpp
Expand Up @@ -436,6 +436,11 @@ struct FitFileReaderState
case 3589: return "Garmin FR745";
case 3592: return "Garmin Varia RTL515";
case 3843: return "Garmin Edge 1040 Solar";
case 3905: case 3908: return "Garmin Fenix 7s";
case 3906: case 3909: return "Garmin Fenix 7";
case 3907: case 3910: return "Garmin Fenix 7x";
case 3990 : return "Garmin FR255";
case 4024 : return "Garmin FR955";
case 20119: return "Garmin Training Center";
case 65532: return "Android ANT+ Plugin";
case 65534: return "Garmin Connect Website";
Expand Down Expand Up @@ -639,6 +644,14 @@ struct FitFileReaderState
} else if (manu == 267) {
// Bryton
return "Bryton";
} else if (manu == 268) {
// SRAM
switch (prod) {
case -1: return "SRAM";
case 1037: return "SRAM Rival eTap AXS";
case 1052: return "SRAM Rival AXS";
default: return QString("SRAM %1").arg(prod);
}
} else if (manu == 282) {
// Sufferfest
return "The Sufferfest";
Expand Down Expand Up @@ -672,8 +685,11 @@ struct FitFileReaderState
case 12: return "Sensor Hub";
case 17: return "Biketrainer"; // fitness equipment
case 30: return "Running Dynamics";
case 31: return "Muscle Oxygen";
case 34: return "Shifting";
case 35: case 36: return "Bikelight"; // bike_light_main/shared
case 40: return "Bikeradar"; // bike_radar
case 40: return "Bike Radar"; // bike_radar
case 46: return "Bike Aero"; // bike_aero
case 120: return "HR"; // heart_rate
case 121: return "Speed-Cadence"; // bike_speed_cadence
case 122: return "Cadence"; // bike_speed
Expand Down

3 comments on commit 8dcd869

@liversedge
Copy link
Member

@liversedge liversedge commented on 8dcd869 Jul 30, 2022

Choose a reason for hiding this comment

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

I wonder if we should have a file on the website with all these in it, then we can just update that and check at runtime?

{
	"VERSION": 1,

	"PRODUCTS": [{
		"MANU": 0,
		"PROD": 208,
		"NAME": "product name"
	}, {
		"MANU": 1,
		"PROD": 12,
		"NAME": "product name2"
	}],

	"MANUFACTURERS": [{
		"MANU": 0,
		"NAME": "manufacturer name"
	}, {
		"MANU": 1,
		"NAME": "manufacturer name2"
	}]
}

@amtriathlon
Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I think it is a good idea, not so much to ease maintenance, but to be able to keep pace with new devices without the need of new binaries.

@liversedge
Copy link
Member

@liversedge liversedge commented on 8dcd869 Jul 30, 2022

Choose a reason for hiding this comment

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

Cool- have written a python script to create it from the FIT SDK fit_examples.h for Garmin devices and fold in a manually maintained list for others devices. Will push the maintenance script when its tested properly then worry about updating the code.

Please sign in to comment.