First of all, let me introduce myself. I am new here, although I do have experience as a programmer in other technologies.
I would like to thank you for all the support you offer in this forum and everything I have learned so far thanks to you about Monkey C.
I am building an application in MonkeyC to monitor several properties related to a breathing exercise. I would like that after recording the activity, a data table related to the rounds carried out in the exercise is registered and displayed, but I can't get this data to be shown as it would be natively with running activity, for example.
I can't get this lap data table to display in any way; I have only managed to add information to the "summary" in Garmin Connect (mobile or web).
Is it possible to record this information in this way? Am I doing something wrong?
session = ActivityRecording.createSession({ :name=>"WHB", :sport=>Activity.SPORT_TRAINING, :subSport=>Activity.SUB_SPORT_BREATHING }); longestRoundField = session.createField("longestRound", 0, FitContributor.DATA_TYPE_UINT32, {:mesgType => FitContributor.MESG_TYPE_SESSION, :units => "s"}); roundField = session.createField("round", 1, FitContributor.DATA_TYPE_UINT32, {:mesgType => FitContributor.MESG_TYPE_LAP}); session.start(); [...] //+ LAP LOOP; currentLongestRound = holdChronoCycle > currentLongestRound ? holdChronoCycle : currentLongestRound; longestRoundField.setData(currentLongestRound); roundField.setData(holdChronoCycle); [...] session.addLap(); //- LAP LOOP;
<fitContributions> <fitField id="0" displayInChart="false" displayInActivitySummary="true" displayInActivityLaps="true" sortOrder="0" precision="0" dataLabel="@Strings.longestRound" unitLabel="@Strings.seconds" /> <fitField id="1" displayInChart="false" displayInActivitySummary="false" displayInActivityLaps="true" sortOrder="1" precision="0" dataLabel="@Strings.round" unitLabel="@Strings.seconds" /> </fitContributions>
The worst part is that when I review the saved Lap information in fitfileViewer, for example, I see that the data has been recorded. I am also attaching images of both FitFileViewer and Monkey Graph.
Monkey Graph