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 48 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
      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
      • First post
        Last post

      Suunto Terms | Privacy Policy