Skip to content

Copy C++ emotiv-lsl implementation into src/emotiv/ and integrate with CMake#1

Merged
CommanderPho merged 3 commits into
mainfrom
copilot/copy-cpp-implementation-and-integrate
Mar 12, 2026
Merged

Copy C++ emotiv-lsl implementation into src/emotiv/ and integrate with CMake#1
CommanderPho merged 3 commits into
mainfrom
copilot/copy-cpp-implementation-and-integrate

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

Ports the C++ implementation from PhoPersonalOrg/emotiv-lsl@af6294d into this dedicated repo, placing it under src/emotiv/ and wiring it into the existing CMake build system alongside the LSL template targets.

New: src/emotiv/

File Role
config.h EEG (128 Hz) and motion (16 Hz) sampling rate constants
emotiv_base.h/cpp Abstract base: USB HID enumeration, AES-ECB decryption, LSL outlet creation, main streaming loop
emotiv_epoc_x.h/cpp EPOC X concrete class: serial-number-derived crypto key, EEG/motion/quality packet decoding, LSL channel metadata
main.cpp Entry point — instantiates EmotivEpocX and calls main_loop()
CMakeLists.txt Builds emotiv_lsl; selects correct hidapi backend per platform (winapi/darwin/libusb)

CMakeLists.txt (root)

  • Added LANGUAGES C (required for aes.c)
  • Hoisted include(FetchContent) to top level
  • New EMOTIVLSL_BUILD_EMOTIV option (default ON) gates all Emotiv-specific deps and the subdirectory
  • FetchContent for hidapi 0.14.0 and tiny-AES-c (source-only; compiled directly into the target with ECB=1, CBC=0, CTR=0)
  • add_subdirectory(src/emotiv) + install rule for emotiv_lsl
# Emotiv-only build — no Qt required
cmake -S . -B build -DLSLTEMPLATE_BUILD_GUI=OFF -DLSLTEMPLATE_BUILD_CLI=OFF
cmake --build build --config Release

README

Updated to reflect this repo's purpose: emotiv-specific title/intro, updated project tree, build prerequisites, configure/build/run instructions for all platforms.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…h CMake

Co-authored-by: CommanderPho <962210+CommanderPho@users.noreply.github.com>
Copilot AI changed the title [WIP] Integrate C++ specific implementation using CMake Copy C++ emotiv-lsl implementation into src/emotiv/ and integrate with CMake Mar 12, 2026
@CommanderPho CommanderPho merged commit c4cbe88 into main Mar 12, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants