Skip to content

Commit e902228

Browse files
authored
Merge pull request #66 from Ritika8081/web-worker
Code Updates to Resolve Issues
2 parents f947aaf + 461bff5 commit e902228

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ Chords is an application based on Web Serial connection, you can connect [Compat
4646

4747
- [Vendors](src/components/vendors.ts) list for board name and there vendor id are taken from [Stackblitz](https://stackblitz.com/edit/typescript-web-serial?file=vendors.ts) created by [William Grasel](https://github.com/willgm)
4848

49+
## Icons Used
50+
- [Lucide React](https://lucide.dev/guide/packages/lucide-react)
51+
4952
## Roadmap for upcoming update
5053

5154
- [X] **Data Filtering** : We will be adding bio-potential signal filtering options which includes 50/60 Hz notch filter to remove AC interference noise and highpass/lowpass remove artefacts from ECG, Emg ,Eog and EEg. Under filters, we will be adding different highpass and lowpass filters for specific bio-potential signals this feature will further enhance the user experience to record even more clear biopotential signals.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chords",
3-
"version": "2.3.2a",
3+
"version": "2.3.3a",
44
"private": true,
55
"type": "module",
66
"scripts": {

src/components/Canvas.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const Canvas = forwardRef(
7171

7272

7373
useEffect(() => {
74-
numXRef.current= (getpoints(selectedBits) * currentValue)+1;
74+
numXRef.current= (getpoints(selectedBits) * currentValue);
7575

7676
}, [ currentValue]);
7777

@@ -310,7 +310,7 @@ const Canvas = forwardRef(
310310
line.setY(currentSweepPos.current[i] % line.numPoints, data[i + 1]);
311311

312312
// Clear the next point to create a gap (optional, for visual effect)
313-
const clearPosition = (currentSweepPos.current[i] + (numXRef.current / 100)) % line.numPoints;
313+
const clearPosition = Math.ceil((currentSweepPos.current[i] + (numXRef.current / 100)) % line.numPoints);
314314
line.setY(clearPosition, NaN);
315315

316316
// Increment the sweep position for the current line
@@ -382,18 +382,6 @@ const Canvas = forwardRef(
382382

383383
}, [animate]);
384384

385-
useEffect(() => {
386-
const handleResize = () => {
387-
createCanvases();
388-
};
389-
390-
window.addEventListener("resize", handleResize);
391-
392-
return () => {
393-
window.removeEventListener("resize", handleResize);
394-
};
395-
}, [createCanvases,]);
396-
397385
return (
398386
<main className=" flex flex-col flex-[1_1_0%] min-h-80 bg-highlight rounded-2xl m-4 relative"
399387
ref={canvasContainerRef}

0 commit comments

Comments
 (0)