Hi together,
I'm currently working on my first Fenix 5 watch application which also includes to write some custom loggings into the FIT files.
The app itself is functioning properly so far, but the data logging doesn't.
When I load it on my watch and start the activity with logging for some minutes and after convert the FIT file to CSV, I can see the data fields, but all entries are 0.
I also added it to the Connect IQ store as Beta version in the hope that this might change things, but no chance. After logging data for some minutes it shows the graphs in the Connect app, but also just zeros.
The values of interest are HDG and COG.
For logging I put the following in the compute() function. But somehow it seams like that this function is not called during runtime.
public function compute() { // Log values in the custom FIT fields _hdgField.setData(_hdg); _cogField.setData(_cog); _sogField.setData(_sog); }
The set values remain zero as initialized in the startRecording() function as below.
//! Start recording a session public function startRecording() as Void { _session = ActivityRecording.createSession({:name=>"MySailing", :sport=>ActivityRecording.SPORT_SAILING}); _session.start(); // Create some custom FIT data fields to be recorded _hdgField = _session.createField("HDG", HDG_FIELD_ID, Fit.DATA_TYPE_FLOAT, {:mesgType=>Fit.MESG_TYPE_RECORD, :units=>"°"}); _cogField = _session.createField("COG", COG_FIELD_ID, Fit.DATA_TYPE_FLOAT, {:mesgType=>Fit.MESG_TYPE_RECORD, :units=>"°"}); _sogField = _session.createField("SOG", SOG_FIELD_ID, Fit.DATA_TYPE_FLOAT, {:mesgType=>Fit.MESG_TYPE_RECORD, :units=>"kn"}); _hdgField.setData(0); _cogField.setData(0); _sogField.setData(0); _recColor = Graphics.COLOR_RED; WatchUi.requestUpdate(); }
You can find the project at GitHub here: https://github.com/Novacat1973/MySailingApp_Drift-Monitor
Any help is highly appreciated.
Many thanks and best regards
Nicolas