Subscriptions to resources not working as expected
-
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 lapSubscribed 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?