Hi!
I am new to .fit file format and I have been working with FIT SDK for a few days. I am stuck when it comes to changing Definition Message and information what Data Messages are going to be send. After I sent Definition Message of type "record" I get the following results:
Definition,0,record,timestamp,1,,position_lat,1,,position_long,1,,distance,1,,time_from_course,1,,total_cycles,1,,accumulated_power,1,,enhanced_speed,1,,enhanced_altitude,1,,altitude,1,,speed,1,,power,1,,grade,1,,compressed_accumulated_power,1,,vertical_speed,1,,calories,1,,vertical_oscillation,1,,stance_time_percent,1,,stance_time,1,,ball_speed,1,,cadence256,1,,total_hemoglobin_conc,1,,total_hemoglobin_conc_min,1,,total_hemoglobin_conc_max,1,,saturated_hemoglobin_percent,1,,saturated_hemoglobin_percent_min,1,,saturated_hemoglobin_percent_max,1,,heart_rate,1,,cadence,1,,compressed_speed_distance,3,,resistance,1,,cycle_length,1,,temperature,1,,speed_1s,5,,cycles,1,,left_right_balance,1,,gps_accuracy,1,,activity_type,1,,left_torque_effectiveness,1,,right_torque_effectiveness,1,,left_pedal_smoothness,1,,right_pedal_smoothness,1,,combined_pedal_smoothness,1,,time128,1,,stroke_type,1,,zone,1,,fractional_cadence,1,,device_index,1,,
Problem is that I want to send Data Message that contains for example only distance, so Definition Message should look more like this:
Definition,0,record,distance,1,,,,,,,,,,,,,,,,
and Data Message:
Data,0,record,distance,"XXX",,,,,,,,,,,,,,,,
I've been analyzing .fit file exported from Strava and I see that it is possible - but is it possible with FIT SDK? I've been trying to change structures and enums related to this message type but with no success.
Code I've been using:
FIT_UINT8 local_mesg_number = 0;
FIT_RECORD_MESG record_mesg;
Fit_InitMesg(fit_mesg_defs[FIT_MESG_RECORD], &record_mesg);
record_mesg.distance = 25;
WriteMessageDefinition(local_mesg_number, fit_mesg_defs[FIT_MESG_RECORD], FIT_RECORD_MESG_DEF_SIZE, fp);
WriteMessage(local_mesg_number, &record_mesg, FIT_RECORD_MESG_SIZE, fp);