Eclipse Plugin 2.1.3 - no info.elapsedDistance

Hi,

I upgraded to the Ecliple 2.1.3 plugin, but my data field program (which worked correctly in 1.3.x) now shows info.elapsedDistance as 0 in the simulator when replaying a .FIT file.

Is anyone experiencing the same problem? I still haven't tested in the watch on a real run, perhaps it's just the simulator...

Thanks,
JF
  • With the 2.1.x SDK things are a bit different in that you actually need to "start" the recording in the sim. When you run a DF in the sim and playback or simulate a .fit, click on the "start" button for the device in the simulator window. Or under the Data Fields menu under "Timer" you can also do a start there. The "lap" button will also cause a onTimerLap() callback in your data field.
  • Hi,

    I upgraded to the Ecliple 2.1.3 plugin, but my data field program (which worked correctly in 1.3.x) now shows info.elapsedDistance as 0 in the simulator when replaying a .FIT file.

    Is anyone experiencing the same problem? I still haven't tested in the watch on a real run, perhaps it's just the simulator...

    Thanks,
    JF


    If you are on a Mac and/or using a FIT file from a D2 Bravo then I feel your pain as nothing other than position (lat/lon) works for me either in the simulator when playing a FIT file.

    Cheers,
    Douglas
  • If you are on a Mac and/or using a FIT file from a D2 Bravo then I feel your pain as nothing other than position (lat/lon) works for me either in the simulator when playing a FIT file.

    Cheers,
    Douglas

    Many of the garmin CIQ folks use macs, and the .fit from the D2 is in a standard format. If you question the .fit, have you used fittocsv from the FIT SDK to look at what's in the file?

    Have you tried just clicking on the "start" button on the device in the sim as I mentioned in this thread?
  • With the 2.1.x SDK things are a bit different in that you actually need to "start" the recording in the sim. When you run a DF in the sim and playback or simulate a .fit, click on the "start" button for the device in the simulator window. Or under the Data Fields menu under "Timer" you can also do a start there. The "lap" button will also cause a onTimerLap() callback in your data field.


    I had realised that - I think that the field is actually null until you press the start button. Afterwards, I've seen it as always 0.000, or even stationary at some other random value (perhaps the elapsed distance at the time I press start)...

    I tried other .FIT files, and they all exhibit the same behaviour. Simulating data has the same effect. I'm running using Fenix 3, sdk 1.3.1.

    I narrowed down my program to this:
    function compute(info) {

    System.println( info.elapsedDistance );
    return;


    Thanks,
    JF
  • I put your Sys.println() call into a test data field and tested with the fenix3 set as the target device (in the simulator). I start simulator, and I see...

    Connecting to device...
    Device Version 0.1.0
    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    null
    null
    null
    null
    null
    null
    null


    I go to Simulation > FIT Data > Simulate Data and this continues...

    null
    null
    null


    I go to Data Fields > Timer > Start Activity and I see the distance start ticking up...

    9.672327
    19.361362
    28.933949


    I go to Data Fields > Timer > Stop Activity and I see the distance stop ticking up...

    28.933949
    28.933949
    28.933949
    28.933949
    28.933949


    I go to Data Fields > Timer > Discard Activity and I see the distance is null again...

    null
    null
    null


    Everything seems to be working exactly as I expect when using simulated data.
  • For completeness, I copied a FIT file from my fr920xt (which is not configured to use smart recording). I ran the same sequence of menu interactions using the FIT file as input.

    Found Transport: tcp
    Connecting...
    Connecting to device...
    Device Version 0.1.0
    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    Copying file.... 2% complete
    Copying file.... 5% complete
    Copying file.... 8% complete
    Copying file.... 10% complete
    Copying file.... 13% complete
    Copying file.... 16% complete
    Copying file.... 18% complete
    Copying file.... 21% complete
    Copying file.... 24% complete
    Copying file.... 27% complete
    Copying file.... 29% complete
    Copying file.... 32% complete
    Copying file.... 35% complete
    Copying file.... 37% complete
    Copying file.... 40% complete
    Copying file.... 43% complete
    Copying file.... 46% complete
    Copying file.... 48% complete
    Copying file.... 51% complete
    Copying file.... 54% complete
    Copying file.... 56% complete
    Copying file.... 59% complete
    Copying file.... 62% complete
    Copying file.... 65% complete
    Copying file.... 67% complete
    Copying file.... 70% complete
    Copying file.... 73% complete
    Copying file.... 75% complete
    Copying file.... 78% complete
    Copying file.... 81% complete
    Copying file.... 84% complete
    Copying file.... 86% complete
    Copying file.... 89% complete
    Copying file.... 92% complete
    Copying file.... 94% complete
    Copying file.... 97% complete
    Copying file.... 100% complete
    File pushed successfully
    Connection Finished
    Closing shell and port
    Found Transport: tcp
    Connecting...
    Connecting to device...
    Device Version 0.1.0
    Device id 1 name "A garmin device"
    Shell Version 0.1.0
    null
    null
    null
    null
    null
    4.011437
    4.011437
    12.817801
    12.817801
    12.817801
    33.176117
    33.176117
    33.176117
    33.176117
    53.481323
    53.481323
    53.481323
    66.938461
    66.938461
    66.938461
    66.938461
    66.938461
    66.938461
    66.938461
    66.938461
    null
    null
    null
    null
    null
    Complete
    Connection Finished
    Closing shell and port


    Again, working just as expected (the repeated values are because the FIT data I provided uses smart recording and doesn't update every second, but the data field does).

    Travis
  • This is really starting to sound like the same this I am experiencing, as documented in my forum post where data that should have a non-null value greater than zero is instead returning 0.0.

    As I just posted in my thread, it's not an issue with null values and it's not an issue with starting the recording or not. I was able to make the exact same code work using different FIT files, one from the vivoactive and one from the vivoactive HR.

    Can you post your FIT file for me to try? I am finding it interesting that FIT files from two watches in the same family (F3 and D2 Bravo) are both not working as expected and everyone else thinks we're crazy and doing something wrong. :)

    I've emailed my FIT file to Connect IQ support so hopefully they can replicate this.

    Cheers,
    Douglas
  • Can you post your FIT file for me to try? I am finding it interesting that FIT files from two watches in the same family (F3 and D2 Bravo) are both not working as expected and everyone else thinks we're crazy and doing something wrong.


    I'd be happy to, but I'm at work and the particular file, and the watch it came from, are both at home. If you just want any .FIT file from a fr920xt of fr735xt device, feel free to use the ones here. They are both from a track session recorded last night.. yes, I was using two devices at the same time.

    Travis
  • I'd be happy to, but I'm at work and the particular file, and the watch it came from, are both at home. If you just want any .FIT file from a fr920xt of fr735xt device, feel free to use the ones here. They are both from a track session recorded last night.. yes, I was using two devices at the same time.

    Travis


    Hi Travis,

    I actually meant for Joao to upload their FIT file, but I'm grabbing yours now to see if those work for me also, so thanks for that. Not surprised about you using multiple devices; I see people doing that all the time around Calgary, where we have a high percentage of runners in the city.

    Cheers,
    Douglas
  • I put your Sys.println() call into a test data field and tested with the fenix3 set as the target device (in the simulator). I start simulator, and I see...
    ...
    Everything seems to be working exactly as I expect when using simulated data.


    Travis, thanks for taking the time to try my program.

    I followed your steps (I wasn't even aware of some of the simulator menus - I just clicked the start button directly), but the problem remains on my laptop. Did you try on a Mac, or are you using Windows?

    I'm using the following Eclipse:

    Eclipse IDE for Java Developers

    Version: Luna Service Release 2 (4.4.2)
    Build id: 20150219-0600

    The plugin is listed as 2.1.4 in Eclipse. The simulator running is:

    MD5 (/opt/connectiq-sdk-mac-2.1.3/bin/ConnectIQ.app/Contents/MacOS/simulator) = 23e7e684f86d206fc1936b45c6708bdb

    Perhaps we were trying different versions?

    Regards,
    JF