Skip to content

Commit

Permalink
Add monitoring() accessor function (#16).
Browse files Browse the repository at this point in the history
  • Loading branch information
grimbough committed Jul 19, 2021
1 parent 4f11519 commit 4e0f771
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -6,6 +6,7 @@ export(getMessagesByType)
export(hrv)
export(laps)
export(listMessageTypes)
export(monitoring)
export(readFitFile)
export(records)
exportClasses(FitFile)
Expand Down
9 changes: 8 additions & 1 deletion NEWS.md
@@ -1,11 +1,18 @@
# FITfileR 0.1.4

## NEW FEATURES

* Added `monitoring()` accessor function to provide a direct interface to
that message type. Response to (#16).

# FITfileR 0.1.3

## BUG FIXES

* Left/right balance fields are now reported correctly, rather than as `NA`.
There are many additional data types that will still be returned as `NA`.
Currently only `date_time`, `left_right_balance`, `left_right_balance_100`,
and all enum data types are dealt with correctly. Reported in (#14)
and all enum data types are dealt with correctly. Reported in (#14).

# FITfileR 0.1.2

Expand Down
14 changes: 13 additions & 1 deletion R/methods_FitFile_accessors.R
Expand Up @@ -193,7 +193,6 @@ setMethod("events", signature = "FitFile",
}
)


#' @rdname FitFile-accessors
#' @export
setGeneric("hrv", function(fitFile) {
Expand All @@ -207,6 +206,19 @@ setMethod("hrv", signature = "FitFile",
}
)

#' @rdname FitFile-accessors
#' @export
setGeneric("monitoring", function(fitFile) {
standardGeneric("monitoring")
})

#' @rdname FitFile-accessors
setMethod("monitoring", signature = "FitFile",
function(fitFile) {
getMessagesByType(fitFile, message_type = 55L)
}
)




Expand Down
6 changes: 6 additions & 0 deletions man/FitFile-accessors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vignettes/FITfileR.Rmd
Expand Up @@ -88,6 +88,7 @@ In addition to the `records()` function, **FITfileR** provides an number of othe
- `events()`
- `file_id()`
- `hrv()`
- `monitoring()`

## Accessing any data type

Expand Down

0 comments on commit 4e0f771

Please sign in to comment.