I'm experiencing heart rate wrong data during activity.

I'm experiencing heart rate wrong data during activity. I tested it with fenix 5x, 5x plus and 6x plus. It works fine for the very first 20/30 minutes then drop under 110 bpm and stays there until i restart the app. I tested with many app on store and also one i m developing. With my app i tried with a chest band and it works like a charm. Is there something with the whirst sensor??

thank you

  • Does this happen with other CIQ apps or just yours?  Here's one of mine, where you actually see HR 3 different ways - From Sensor, SensorHistory, and Activity.  Start the app and start recording when you get GPS.  Then scroll through the screens and you'll see one that's all about HR.  The 3 lines at the top are Activity, the graph from SensorHistory, and the bottom line, from Sensor.  It will be recording an activity, so you can look at the HR graph in GC.

    apps.garmin.com/.../116a5b59-29ae-4397-a70e-907d7e5f8e44

  • ok i will install and try to check during my next spinning activity. Anyway others have same issue... i think is something about how fw manage the whirstl sensor... check the link _psx_ submit

    https://forums.garmin.com/outdoor-recreation/outdoor-recreation/f/fenix-6-series/318698/heart-rate-monitoring-unexpecdly-drops-to-low-values-during-workout

    thank you for the answer

  • can you say you set to global once and in another place read members many 'in future' from it?

  • yes... i mean it works:

    import Toybox.Time.Gregorian;
    import Toybox.ActivityMonitor;
    import Toybox.Graphics;
    import Toybox.Lang;
    import Toybox.Timer;
    import Toybox.WatchUi;
    using Toybox.FitContributor;

    ....cut

                var HRInfoObj=null;

    class DrakeSpinningApp01View extends WatchUi.View
    {

    ... cut

    then there is my function which will be called inside the onUpdate...
    .... cut
        // get the actual HR data
        function getHRData_RT()
            {
                 // populate global HR data object
                HRInfoObj=Activity.getActivityInfo();
               
                                if (HRInfoObj.currentHeartRate == null) {ActualHRVal=0;}
                    else {ActualHRVal=HRInfoObj.currentHeartRate;}
    .....
    at first i put the following inside the function:
                var HRInfoObj=Activity.getActivityInfo();
                   if (HRInfoObj.currentHeartRate == null) {ActualHRVal=0;}
                    else {ActualHRVal=HRInfoObj.currentHeartRate;}
     
    so the var will be destroyed when the function ends. Both works. I did the change due the issue i was facing to. Changing things to see if behaviour is the same.... :-D
  • 1. I've asked if you call getActivityInfo() only once (e.g. in initialise), but probably not because in onUpdate so you have current info

    2.Activity.getActivityInfo() can return null....

    var

    a = Activity.getActivityInfo();

    h = a ? a.currentHeartRate : 0;

    ActualHRVal = h ? h : 0;

                                

  • but he's not getting null In fact he even gets a "valid" currentHeartrate that is < 100

  • that's correct but... _psx_ could be right too... It is a mistake i did it more than twice :-D

    i check null for Activity.getActivityInfo().currentHeartRate but not for Activity.getActivityInfo() itself

    maybe i can do the fix and have a try if bug still there...

  •  this shoudl be the right way:
      // get the actual HR data
        function getHRData_RT()
            {
                 // populate global HR data object
                HRInfoObj=Activity.getActivityInfo();
               
                if (HRInfoObj!=null)
                    {
                        if (HRInfoObj.currentHeartRate == null) {ActualHRVal=0;}
                        else {ActualHRVal=HRInfoObj.currentHeartRate;}
                    } else {ActualHRVal=0;}        
            }
  • and than somebody complaints about problem of memory :-)

    where getHRData_RT() is called? in onUpdate?

    why do you populate HRInfoObj to global?

  • How/when is getHRData_RT() being called?  Based on a Timer?  Have you tried adding some println() calls and setting up a log file on the device and then running a sideload?