Suunto app Forum Suunto Community Forum
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Subscriptions to resources not working as expected

    Scheduled Pinned Locked Moved Suunto Plus Development
    1 Posts 1 Posters 176 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      matram Bronze Member
      last edited by

      I am struggling with getting subscriptions working as expected. This is what I tested …

      Subscribed in manifest …
      /Activity/Move/-1/Speed/Current - OK
      /Activity/Move/-1/Speed/Avg - Seems to return instantaneous value
      /Activity/Lap/-1/Speed/Avg - OK
      /Activity/Lap/-1/Speed/Max - returns NaN
      /Activity/Lap/-1/Speed/Min - returns NaN
      /Activity/Lap/-2/Speed/Avg - Seems to give average from current lap

      Subscribed resources are assigned to a JS variable, which is inspected in the simulator

      function evaluate(input, output) {
      // Copy resource to JS variable
      mrDebug = input.SpeedAvg;

      Lap here is generated in code by …

      // Trigger a silent lap
      $.put(‘Activity/Trigger’, 24);

      Currently I am computing max HR and average pace for last lap in evaluate() but it would be nice to get it from the FW. Any suggestions?

      Also I have tried having two subscriptions to the same resource but with different names (e.g. last lap average) in the manifest file. That does not seem to work, is this by design, i.e. only one subscription allowed?

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • First post
        Last post

      Suunto Terms | Privacy Policy