Skip to content

Commit

Permalink
minor object name improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed May 12, 2023
1 parent 882290d commit 4b8f084
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions R/readAxivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,17 @@ readAxivity = function(filename, start = 0, end = 0, progressBar = FALSE, desire
rawPos = 1
i = 2
while (i <= numDBlocks) {
timeSkip = start - prevRaw$start
time2Skip = start - prevRaw$start
blockDur = prevRaw$length / prevRaw$frequency
blockSkip = floor(timeSkip/blockDur) - 1
Nblocks2Skip = floor(time2Skip/blockDur) - 1

if (i >= blockSkip) { # start of recording
if (i >= Nblocks2Skip) { # start of recording
raw = readDataBlock(fid, header_accrange = header$accrange, struc = struc,
parameters = prevRaw$parameters)
} else {
# skip blocks
seek(fid, 512 * blockSkip, origin = 'current')
i = i + blockSkip
seek(fid, 512 * Nblocks2Skip, origin = 'current')
i = i + Nblocks2Skip
next
}
if (is.null(raw)) {
Expand Down

0 comments on commit 4b8f084

Please sign in to comment.