You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) and found some pointer to use the FieldDescriptionMessage but then got into trouble in getting the BaseTypeData
Any help would be appreciated
This is what I found from Garmin's FitSDK CookBook
// Create the Developer Id message for the developer data fields.
let developerIdMesg = FITDeveloperDataIdMesg();
// It is a BEST PRACTICE to reuse the same Guid for all FIT files created by your platform
// "00010203-0405-0607-0809-0A0B0C0D0E0F"
let appId: [UInt8] = [0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f]
for byte in appId {
developerIdMesg.setApplicationId(byte, for: byte)
}
developerIdMesg.setDeveloperDataIndex(0);
developerIdMesg.setApplicationVersion(110);
messages.append(developerIdMesg);
// Create the Developer Data Field Descriptions
let doughnutsFieldDescMesg = FITFieldDescriptionMesg();
doughnutsFieldDescMesg.setDeveloperDataIndex(0);
doughnutsFieldDescMesg.setFieldDefinitionNumber(0);
doughnutsFieldDescMesg.setFitBaseTypeId(FITFitBaseTypeFloat32);
doughnutsFieldDescMesg.setFieldName("Doughnuts Earned", for:0);
doughnutsFieldDescMesg.setUnits("doughnuts", for:0);
doughnutsFieldDescMesg.setNativeMesgNum(FITMesgNumSession);
messages.append(doughnutsFieldDescMesg);
Do you have any samples of encoding any form of Developer Fields that you can share? I'm not even sure how to get the developer field record messages to be encoded as well. (based on Garmin CookBook, developer fields is just appended to the recordMessages).
The text was updated successfully, but these errors were encountered:
I would like to encode some fields/data into the developer data fields. I see that FitDataProtocol supports it.
I have been able to get the developerID to be encoded but am stuck in the fields.
I looked at the XCTests (
FitDataProtocol/Tests/FitDataProtocolTests/FitMessageTests.swift
Line 243 in 7d62bfd
FieldDescriptionMessage
but then got into trouble in getting theBaseTypeData
Any help would be appreciated
This is what I found from Garmin's FitSDK CookBook
Do you have any samples of encoding any form of Developer Fields that you can share? I'm not even sure how to get the developer field record messages to be encoded as well. (based on Garmin CookBook, developer fields is just appended to the recordMessages).
The text was updated successfully, but these errors were encountered: