sports-lib icon indicating copy to clipboard operation
sports-lib copied to clipboard

Check if paused

Open JosephTuffin opened this issue 3 years ago • 1 comments

Hi, is there a way to check if the device is paused at each point of the data stream for FIT files? I can get the total time paused but I can't see a way to check at specific times.

Cheers

JosephTuffin avatar Nov 11 '20 20:11 JosephTuffin

Hey its well possible. Plenty of ways todo this.

You can check the getPause(): DataPause; method on the object (event) you get back or even the events. However not all services or file formats do add pauses or events

/**
   * Gets only the start type of events
   */
  getStartEvents(): DataStartEvent[];

  /**
   * Gets only the stop type of events
   */
  getStopEvents(): DataStopEvent[];

  /**
   * Gets the stop all type of events
   */
  getStopAllEvents(): DataStopAllEvent[];

Keep me posted if you need more help and sorry for the late reply

jimmykane avatar Nov 13 '20 08:11 jimmykane