Skip to content

Commit 83c2f51

Browse files
authored
Add files via upload
1 parent 27c2910 commit 83c2f51

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

avdweb_scope.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Version 10-2-2017 sampleA sampleB sampleABC sampleABCD to avoid mistakes
1717
all unsigned int -> int
1818
added stop()
1919
sizeof(int)
20+
SerialUSB -> Serial (incl. <Albert.h>)
2021
2122
start ___|____________________________________|________
2223
@@ -55,17 +56,17 @@ void Scope::stop()
5556
void Scope::show()
5657
{ unsigned long stop_us = micros(); // to avoid delay, start with this
5758
unsigned long usPerDiv = samples > 1 ? (stop_us - sample0_us)/(samples-1) : 0;
58-
while(!SerialUSB); // wait on Serial Monitor
59-
SerialUSB << "\nusPerDiv " << usPerDiv;
59+
while(!Serial); // wait on Serial Monitor
60+
Serial << "\nusPerDiv " << usPerDiv;
6061
samplingOn=0;
61-
SerialUSB << "\nptr value ";
62+
Serial << "\nptr value ";
6263
ptr=stopPtr;
6364
do
64-
{ if(channels==1) SerialUSB << endl << ptr, ringBuffer.chA[ptr];
65-
if(channels==2) SerialUSB << endl << ptr, ringBuffer.chAB[ptr][0], ringBuffer.chAB[ptr][1];
66-
if(channels==3) SerialUSB << endl << ptr, ringBuffer.chABC[ptr][0], ringBuffer.chABC[ptr][1], ringBuffer.chABC[ptr][2];
67-
if(channels==4) SerialUSB << endl << ptr, ringBuffer.chABCD[ptr][0], ringBuffer.chABCD[ptr][1], ringBuffer.chABCD[ptr][2], ringBuffer.chABCD[ptr][3];
68-
if(ptr==triggerPtr) SerialUSB << " trigger";
65+
{ if(channels==1) Serial << endl << ptr, ringBuffer.chA[ptr];
66+
if(channels==2) Serial << endl << ptr, ringBuffer.chAB[ptr][0], ringBuffer.chAB[ptr][1];
67+
if(channels==3) Serial << endl << ptr, ringBuffer.chABC[ptr][0], ringBuffer.chABC[ptr][1], ringBuffer.chABC[ptr][2];
68+
if(channels==4) Serial << endl << ptr, ringBuffer.chABCD[ptr][0], ringBuffer.chABCD[ptr][1], ringBuffer.chABCD[ptr][2], ringBuffer.chABCD[ptr][3];
69+
if(ptr==triggerPtr) Serial << " trigger";
6970
ptr = calcPtr(ptr+1);
7071
}
7172
while (ptr!=stopPtr);

0 commit comments

Comments
 (0)