Skip to content

Commit 27c2910

Browse files
authored
Add files via upload
1 parent 9eafb4d commit 27c2910

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

avdweb_scope.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Version 10-2-2017 1, 2, 3, 4 channels
1616
Version 10-2-2017 sampleA sampleB sampleABC sampleABCD to avoid mistakes
1717
all unsigned int -> int
1818
added stop()
19+
sizeof(int)
1920
2021
start ___|____________________________________|________
2122
@@ -42,7 +43,7 @@ void Scope::start(byte _channels, int _preSamples, unsigned int _recordLenght)
4243
stopPtr=32767;
4344
samplingOn=1;
4445
channels = _channels;
45-
recordLenght = maxBytes/(2*channels); // byte = 2 * int
46+
recordLenght = maxBytes/(sizeof(int)*channels);
4647
if(_recordLenght <= recordLenght) recordLenght = _recordLenght;
4748
if(abs(_preSamples) <= recordLenght) preSamples = _preSamples;
4849
}

0 commit comments

Comments
 (0)