5 years since I made my datafield. Does the tools to develop already improved?

I remember my adventure 5 years ago to develop the datafield I wanted.... it was horrible since all the tools to program it are fragmented, in the way garmin works.  In 5 years have the tools evolved for good? Is there now a single tool, easy to use and debug that I can use now?  I remember I had to download so many different things to be able to develop something.

Top Replies

All Replies

  • Well theres the eclipse sdk or vscode sdk where you can code, test and export your apps/widgets/datafields/etc 

    If i remember correctly for the eclipse one all you needed to do was download eclipse and the sdk to be used with it, I may be forgetting something, however once its done you only need to open up eclipse itself and code your thing. Vscode I’m not sure as I don’t use it.

  • I remember I used eclipse at that time, a headache that I deleted that name from my memory and just remember when you named it. I am just trying to start again following the "getting started"  instructions which now uses Visual Studio Code. Hopefully it is much simpler.

    However I had already to download and setup:

    1. VSCode

    2. Java

    3. SDK manager

    When I was student we had to made our own compiler/editor  why Garmin, with professionals, cannot develop just one compiler without need of downloading Java and that can have sdk manager as part of it... I mean, just one app.

  • I see what you mean. Although Java is a core dependancy for a lot of programs so i’m not surprised it’s required. 

  • Day 2 of trying to make my old datafield code live again, but now using vscode instead of eclipse. I copied the code first selecting simple datafield, but it looks like it has to be complex because I can only see one number of text in my simulation. Then now I am trying to create again but selecting a complex datafield. I am adding function by function and tried to clear out any error that came. 

    Now I got an error "Cannot find symbol ':getHeartRateZones' on type '$.Toybox.UserProfile.Profile'." 

    My lines are:

    var profile = UserProfile.getProfile();
            if( profile != null ) {
                 mHRZones = profile.getHeartRateZones(profile.getCurrentSport());
            }
    and I defined: 
    using Toybox.UserProfile as UserProfile;
    exactly the same as my original datafield I developed 5 years ago.. but several things changed and now It does not allow me to run my code as originally was. 
    What I am doing wrong? is the "getHeartRateZones" method changed?  I selected minimum api to still cover the edge 1000 
  • That code is technically incorrect, although it may run without problems (I haven't tried it). As per the docs, the code you're looking for is:

    mHRZones = UserProfile.getHeartRateZones(UserProfile.getCurrentSport());

    getCurrentSport() and getHeartRateZones() are methods in the UserProfile module (just like getProfile()), not methods on the UserProfile.Profile object/class.

  • Interesting that it ran well 5 years ago if it was technically incorrect.. anyways, that solved one of the errors I was getting. Do you know if Garmin already made something similar but for power zones? something like getPowerRateZones?  or at list a way to pull the resting HR or the Max HR... 5 years ago none of that was available, so I had to ask the FTP as part of the datafield setup . I just looked into the api documentation but could not find anything like that, but may be I am looking at the wrong place