OpenBCI / OpenBCI_GUI

A cross platform application for the OpenBCI Cyton and Ganglion. Tested on Mac, Windows and Ubuntu/Mint Linux.
MIT License
708 stars 257 forks source link

Add Software Marker Widget #1174

Closed retiutut closed 1 year ago

retiutut commented 1 year ago

Closes #1091 Closes #1114

Account for the following:


Other consequential changes while reviewing keyboard shortcuts:

retiutut commented 1 year ago

image

Markers making their way into OpenBCI CSV files. Loaded into spreadsheet and sorted that column. You can see the markers next to the timestamp channel.

retiutut commented 1 year ago

image

We will print an approximate time that a marker was inserted into the data. Here we see that the timestamp was correct down to the millisecond!

During this test, only one marker was inserted, so this screenshot/data is not an accident.

retiutut commented 1 year ago

image

Markers showing up in playback!

retiutut commented 1 year ago

LSL Networking Test image

UDP Networking Test (everything is right but the sampling rate calculation is incorrect) image

OSC Networking Test image

Serial Networking Test image

retiutut commented 1 year ago
  • [ ] Add some padding on the right side of the buttons
  • [x] Consider making the buttons larger and splitting them into two rows
  • [ ] Autoscale the height of the graph

I don't think autoscaling is the way to go here (for now), until users are allowed to stream in floats from another program. Then, it should be the only option for that source.

retiutut commented 1 year ago

image image

Successfully inserting markers (as floats) from external process over UDP.

retiutut commented 1 year ago

image

philippitts commented 1 year ago
  • [ ] Add some padding on the right side of the buttons
  • [x] Consider making the buttons larger and splitting them into two rows
  • [ ] Autoscale the height of the graph

I don't think autoscaling is the way to go here (for now), until users are allowed to stream in floats from another program. Then, it should be the only option for that source.

Maybe we should add it now that it's possible to stream in floats from an external source?

retiutut commented 1 year ago
  • [ ] Add some padding on the right side of the buttons
  • [x] Consider making the buttons larger and splitting them into two rows
  • [ ] Autoscale the height of the graph

I don't think autoscaling is the way to go here (for now), until users are allowed to stream in floats from another program. Then, it should be the only option for that source.

Maybe we should add it now that it's possible to stream in floats from an external source?

Instead of this, users now have full control over the Y Axis, up to 20.0. Autoscale is kind of weird here since all values should be greater than 0, and it may cause "bouncing" when the graph resizes. Overall, the UX is likely better without the Y axis dynamically changing.

EDIT: On second thought, users should have the freedom to send values > 20 and still see it, though it might look weird when the graph Y axis jumps from lets say 1000 to 1 after the data point leaves the graph.

I'll add Auto as an option to Vert Scale, since we have a precedent in other widgets.

retiutut commented 1 year ago
  • [x] It looks like there a few files where the whole file ended up as a diff for some reason. Can you double check your line endings and try restaging the files?
  • [ ] I'm not sure how to provide external triggers via something like netcat. Can you provide some information (PR comment is fine) on this? Should the external process listen or host the connection? Does the stream have to be started first?

In the included Python example in NetworkingTestScripts folder, we send a single float over UDP to the specified IP and Port. Though, the float is packed as a byte array.

The GUI will always listen on the specified port, and this does not use multicast. When the IP and Port are changed, the GUI will remake the UDP listener after leaving the textfield or pressing enter. A message will show at the bottom of the GUI and console log. This means the GUI and external process are completely independent and either can be started at any time.