Monkeygraph doesn't show the session value / how to format time data

I'm still struggeling with writing and analyzing my FIT data, I would really appreciate if somebody has a hint for me where to look at.

Mainly, I have 2 question:

1) I am writing a session value into my FIT file. I defined my resource like

<resources>
    <fitContributions>
        <fitField id="2" displayInChart="false"
                           displayInActivityLaps="false"
                           displayInActivitySummary="true"
                           sortOrder="0"
                           precision="0"
                           dataLabel="@Strings.txt1"
                           unitLabel="@Strings.txt2"  />
...

and initialized like

        FitField = DataField.createField(
                WatchUi.loadResource(Rez.Strings.Fit_field1),
                2
                FitContributor.DATA_TYPE_UINT16,
                {:mesgType=>FitContributor.MESG_TYPE_SESSION, :units=>WatchUi.loadResource(Rez.Strings.unitfield)});
        FitField.setData(0);

I made sure the data is set in the compute method. I then used the simulator to create a FIT file, what works fine, but in the overview I only receive the value "#VALUE?" for my session field. Why is this happening?

2) I tried to write time data in the format "6:30" or "12:13" into the FIT file, displayable as a chart (mesgType=>FitContributor.MESG_TYPE_RECORD) / displayInChart="true"). What format is to use there? I understand STRING is not an option for it is not allowed in charts. I found an example program using a FLOAT, but in MonkeyGraph, it showed up like "6.3" and "12.1" then even if i set the precision to 2 in the resource file. Is there a way/data type tio use to write time data as a chart into a FIT file? Thanks!

  • This is getting strange, i double checked the IDs, i made sure the values get updates by the setData() method every second, but still the value "#VALUE?" is shown in the summary for all values. My graphs are written perfectly fine, but my summary values are empty. I could really use a hint here!

  • So just in case someone with the same problem stumbles over this:

    I could solve it by substituting all Integer field with Float field, e.g.

    FitField = DataField.createField(
                    WatchUi.loadResource(Rez.Strings.Fit_field),
                    FIELD_ID,
                    FitContributor.DATA_TYPE_UINT32,
                    {:mesgType=>FitContributor.MESG_TYPE_SESSION, :units=>WatchUi.loadResource(Rez.Strings.Std_unit)});

    with

    FitField = DataField.createField(
                    WatchUi.loadResource(Rez.Strings.Fit_field),
                    FIELD_ID,
                    FitContributor.DATA_TYPE_FLOAT,
                    {:mesgType=>FitContributor.MESG_TYPE_SESSION, :units=>WatchUi.loadResource(Rez.Strings.Std_unit)});

    and modified my FitContributions resource to precision 0. Everything works fine now. No idea why integers cause problems like this, but i have a working solution now...

    Still haven't found a solution how to handle time values to be represented correctly. My graph gets shown in MonkeyGraph, but it's a float value, not a time value, what doesn't look the way i want it to. If anybody knows about how to handle this, I'd really really appreciate any hint!