Skip to content

Commit

Permalink
pass maxAllowedCorruptBlocks into readAxivity
Browse files Browse the repository at this point in the history
  • Loading branch information
l-k- committed Dec 5, 2023
1 parent de3f4fa commit 1f85a1b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions R/readAxivity.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
readAxivity = function(filename, start = 0, end = 0, progressBar = FALSE, desiredtz = "",
configtz = c(), interpolationType = 1, loadbattery = FALSE,
header = NULL, frequency_tol = 0.1) {
header = NULL, frequency_tol = 0.1,
maxAllowedCorruptBlocks = 20) {
if (length(configtz) == 0) configtz = desiredtz
blockBytes = 512
headerBytes = 1024
maxAllowedCorruptBlocks = 20 # max number consecutive blocks with a failed checksum that we'll tolerate

# Credits: The original version of this code developed outside GitHub was
# contributed by Dr. Evgeny Mirkes (Leicester University, UK)
Expand Down
5 changes: 4 additions & 1 deletion man/readAxivity.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
\usage{
readAxivity(filename, start = 0, end = 0, progressBar = FALSE,
desiredtz = "", configtz = c(), interpolationType=1, loadbattery = FALSE,
header = NULL, frequency_tol = 0.1)
header = NULL, frequency_tol = 0.1, maxAllowedCorruptBlocks = 20)
}
\arguments{
\item{filename}{
Expand Down Expand Up @@ -55,6 +55,9 @@
differs by more than 5\%, but if this is less than frequency_tol the block will
not be imputed.
}
\item{maxAllowedCorruptBlocks}{
Max number of consecutive blocks with a failed checksum that we'll tolerate.
}
}
\value{
Expand Down

0 comments on commit 1f85a1b

Please sign in to comment.