How to acquire Stryd's power data?

Hello all,

I'm trying to figure out how to make a datafield that would display the power data from Stryd (I'm using Forerunner 245).

The Stryd Zones datafield somehow manage to display power on this watch.

I've read somewhere that it's possible through SensorInfo datafield somehow acquiring the power data in the Background process, but I can't figure out how to implement that. Does anyone possibly know how to do it?

Best,

Karol

  • Thank you! Slight smile

    It seems that I was too fast to judge - it appears to be stable now. I will check it in the field tommorrow.

    Hurray! I'm so happy that I don't have to buy FR 945 in order to have the features I need. Plus, the satisfaction from modding the watch by myself is priceless :)

    I'm not professional developer, so your advice about saving memory and cleaning the code is very helpful to me.

    Btw. I'm modyfing the Run Power Workout Datafield (https://apps.garmin.com/pl-PL/apps/8c2fce29-0c7c-41f3-9a8f-5d3093c9cf2f) which didn't support my watch in showing the power data, but is very pretty at displaying structured workout info.

    I have also implemented averaging power from 3 seconds and it seems pretty consistent.

    I wonder what else could I do - ah, the possibilities Slight smile

    Thanks again for your help.

    Edit: After reading your tips, I did it like this:

    var pSensor = Application.getApp().pSensor;
    
    function compute(info) {
    
    if (pSensor.reopen == true) {
    	        	try {
    	        		pSensor = null;
    	        		Application.getApp().pSensor = null;
    	        		
    		            pSensor = new PowerSensor(43121);
    		            
    		        } catch(e instanceof Ant.UnableToAcquireChannelException) {
    		            System.println(e.getErrorMessage());
    		            pSensor = null;
    		            Application.getApp().pSensor = null;
    	        	}
            	}
    }

    My only doubt now is that I create new instance of the PowerSensor in the DataField instance, and not in the App instance, as it is done at the beginning. Is it alright?

  • I guess it's okay, but the app does need a reference to the PowerSensor so you can call close() when the app exits. I suppose it would work either way, but it's probably better to call it explicitly.

  • Right, so I'm trying that:

    Application.getApp().pSensor = new PowerSensor(43121);
    pSensor = Application.getApp().pSensor;