File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -1273,6 +1273,7 @@ const Connection: React.FC<ConnectionProps> = ({
12731273 setSelectedChannels ( selectedChannels )
12741274
12751275 } , [ selectedChannels ] ) ;
1276+ const prevSampleCounterRef = useRef < number | null > ( null ) ; // Variable to store the previous counter value for loss detection
12761277
12771278 // Function to read data from a connected device and process it
12781279 const readData = async ( ) : Promise < void > => {
@@ -1282,7 +1283,6 @@ const Connection: React.FC<ConnectionProps> = ({
12821283 const SYNC_BYTE1 = 0xc7 ; // First synchronization byte to identify the start of a packet
12831284 const SYNC_BYTE2 = 0x7c ; // Second synchronization byte
12841285 const END_BYTE = 0x01 ; // End byte to signify the end of a packet
1285- const prevSampleCounterRef = useRef < number | null > ( null ) ; // Variable to store the previous counter value for loss detection
12861286 const notchFilters = Array . from ( { length : maxCanvasElementCountRef . current } , ( ) => new Notch ( ) ) ;
12871287 const EXGFilters = Array . from ( { length : maxCanvasElementCountRef . current } , ( ) => new EXGFilter ( ) ) ;
12881288 const pointoneFilter = Array . from ( { length : maxCanvasElementCountRef . current } , ( ) => new HighPassFilter ( ) ) ;
You can’t perform that action at this time.
0 commit comments