Fit Contributor

Hi,

just a question to the FitContributor: If I calculate the average values of an high-intensity period of an interval and write those values to the Fit file, does Garmin connect web make those values somehow visible or is it just a value in the Fit file?
  • Hi Travis,

    I checked the graph in monkeygraph. In monkeygraph the graph is blue, as intended. In chrome the graph is depicted in black, in Edge browser the graph is invisible (but if you hover with the mouse over it you can see the recorded data at the cursor) and in Garmin Connect Mobile the graph is red.

    I used this data type (float) since (as mentioned in this thread on post #28) I never got UINT8 running at all.
  • Edit: I just reviewed the source code of the Moxyfield and don't understand the "precision" in the resources file. The api says:
    precision Decimal point precision for numeric data 0 for integer, 1 for one decimal point, 2 for two decimal points. Without this attribute the default is no rounding

    Nevertheless, the Moxyfield states following in the resources file:
    <fitField id="0"
    displayInChart="true"
    sortOrder="0"
    precision="2"
    chartTitle="@Strings.hemoglobin_concentration_label"
    dataLabel="@Strings.hemoglobin_concentration_label"
    unitLabel="@Strings.hemoglobin_concentration_units"
    fillColor="#FF0000" />


    But in the code I can review:

    const CURR_HEMO_CONC_FIELD_ID = 0;

    mCurrentHCField = dataField.createField("currHemoConc", CURR_HEMO_CONC_FIELD_ID, Fit.DATA_TYPE_UINT16, { :nativeNum=>54, :mesgType=>Fit.MESG_TYPE_RECORD, :units=>"g/dl" });



    To be honest: for a UINT16 I would expect a "precision" of 0. Can someone clear things up?
  • This error is driving me crazy on all examples here, Do i have to name the fit contributions.xml different  what im doing wrong

    BUILD: ERROR: Fit contribution id=0's 'chartTitle' references non existent string ID 

    thanks

  • Perhaps you can share your fitcontributions.xml file? from the looks of it, seems like possible you didn't have a string defined for it?

    See below for the "strings"  and the FitContributions. The Fitcontributions is using the names it gets from "strings" (@strings)

        <strings>
            <string id="namaste_label">Namastes</string>
            <string id="namaste_graph_label">Namastes</string>
            <string id="namaste_units">N(s)</string>
        </strings>
        <fitContributions>
            <fitField id="0" displayInChart="true" sortOrder = "0" precision="2"
            chartTitle="@Strings.namaste_graph_label" dataLabel="@Strings.namaste_label"
            unitLabel="@Strings.namaste_units" fillColor="#FF0000" />
        </fitContributions>