Skip to content

ANT Neuro SDK functions #764

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bdieudonne
Copy link
Contributor

@bdieudonne bdieudonne commented Apr 30, 2025

Added ANT SDK info as custom config_board function "get_info":

board.config_board("get_info")

would return (for example):

{
    "type": "EE411",
    "firmware_version": 12345,
    "serial_number": "424242",
    "sampling_rates": [500,512,1000,1024,2000,2048],
    "reference_ranges": [1,0.75,0.15],
    "bipolar_ranges": [1,0.75,0.15],
    "power_state": {
        "is_powered": 1,
        "is_charging": 0,
        "charging_level": -1
    }
}

Copy link
Member

@Andrey1994 Andrey1994 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an idea looks nice, just need to swap to json on cpp side instead stringstream

@@ -471,8 +474,73 @@ int AntNeuroBoard::config_board (std::string config, std::string &response)
return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR;
}
}
else if (config == get_info) // return stringified JSON with info from ANT board
{
std::ostringstream oss;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not use stringstream, brainflow imports nlohman json already and you can just constract a json object. It will look cleaner

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