Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networking LSL AvgBandPower: only one band value is sent #1098

Closed
chris-zielinski opened this issue Jan 11, 2023 · 2 comments
Closed

Networking LSL AvgBandPower: only one band value is sent #1098

chris-zielinski opened this issue Jan 11, 2023 · 2 comments

Comments

@chris-zielinski
Copy link

Problem

When using the LSL networking protocol to send the AvgBandPower, the data output is only one single value.

Expected

Like for the other protocol, the expected output should be the 5 avg power value (one per band).
In the W_Networking.pde/sendNormalizedPowerBandData function, the loop across each frequency band is missing for the LSL case.

Operating System and Version

Windows

GUI Version

5.1.0

Running standalone app

downloaded app

Type of OpenBCI Board

Synthetic

Are you using a WiFi Shield?

No

Console Log

Thank you!

@retiutut
Copy link
Member

retiutut commented Jan 12, 2023

Confirmed using Networking test kit. When this metric was added it was in support of OpenBCI team using UDP. Thanks for bringing this oversight to our attention. We will include the fix in the next version of the GUI.

@retiutut
Copy link
Member

retiutut commented Jan 12, 2023

Actually the code in sendNormalizedPowerBandData() is fine, since we pass in a single dimension array, which is a valid option for LSL push_sample. What's wrong is the number of channels per sample, which should be 5 instead of 1.

Screen Shot 2023-01-11 at 9 08 52 PM

In the screenshot, you'll see that this is now correct with 5 band powers whose sum is 1. The sampling rate is roughly equal to the framerate of the GUI (since that's when updates occur for a derivative metric).

Getting a PR for this in now since it's such an easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants