Skip to content

Commit

Permalink
Merge pull request #57 from Amanmahe/filters
Browse files Browse the repository at this point in the history
Enhance Device Connection and Signal Filtering
  • Loading branch information
lorforlinux authored Nov 30, 2024
2 parents ba8f0cb + 4e1b362 commit 445c1a2
Show file tree
Hide file tree
Showing 6 changed files with 573 additions and 146 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,26 @@ Chords is an application based on Web Serial connection, you can connect boards

- [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)

## Roadmap for upcoming update

**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.


**Snapshot of data** : We will add the option to show up to 10 snapshots of length 4 seconds each providing you the option to take a peek into past 40 seconds of your data.

**Multiple file download support** : We’re excited to enhance your options for downloading recorded data! Currently, you can record a file and choose to save or delete it. Soon, you’ll be able to download multiple files at once and have the flexibility to download or delete individual recorded files as needed.

**Raspberry Pi Pico support** : We will be releasing Raspberry Pi Pico support for chords which by the way works very well with our new Heart BioAmp Candy. Let us know your favorite board in the comments section below and we will make sure to add chords support for your board in the upcoming updates.


**CSV compatibility with [Chords Python](https://github.com/upsidedownlabs/Chords-Python)** : we will update the CSV data format and file names for both chords-web and chords-python so that you can use csvplotter.py to easily plot the recorded data.


## Contributors

Thank you for contributing to our project! Your support is invaluable in creating & enhancing Chords-Web and making it even better. 😊


<center>
<a href="https://github.com/upsidedownlabs/Chords-Web/graphs/contributors">
<img src="https://contrib.rocks/image?repo=upsidedownlabs/Chords-Web" />
Expand Down
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "next start",
"lint": "next lint",
"export": "next export",
"distDir":"out"
"distDir": "out"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.0",
Expand Down Expand Up @@ -38,7 +38,7 @@
"framer-motion": "^11.5.4",
"html2canvas": "^1.4.1",
"jszip": "^3.10.1",
"lucide-react": "^0.383.0",
"lucide-react": "^0.460.0",
"next": "14.2.10",
"next-themes": "^0.3.0",
"react": "^18",
Expand Down
5 changes: 1 addition & 4 deletions src/components/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,11 @@ const Canvas = forwardRef(
});

linesRef.current.forEach((line, i) => {
const bitsPoints = Math.pow(2, getValue(selectedBits)); // Adjust according to your ADC resolution
const yScale = 2 / bitsPoints;
const chData = (data[i] - bitsPoints / 2) * yScale;

// Use a separate sweep position for each line
currentSweepPos.current[i] = sweepPositions.current[i];
// Plot the new data at the current sweep position
line.setY(currentSweepPos.current[i] % line.numPoints, chData);
line.setY(currentSweepPos.current[i] % line.numPoints, data[i]);

// Clear the next point to create a gap (optional, for visual effect)
const clearPosition = (currentSweepPos.current[i] + (numX / 100)) % line.numPoints;
Expand Down
Loading

0 comments on commit 445c1a2

Please sign in to comment.