forked from brainflow-dev/brainflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NeuroPawn/knight-board
Knight board
- Loading branch information
Showing
13 changed files
with
399 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,5 +59,6 @@ | |
EXPLORE_PLUS_8_CHAN_BOARD(54) | ||
EXPLORE_PLUS_32_CHAN_BOARD(55) | ||
PIEEG_BOARD(56) | ||
NEUROPAWN_KNIGHT_BOARD(57) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <thread> | ||
|
||
#include "board.h" | ||
#include "board_controller.h" | ||
#include "serial.h" | ||
|
||
class Knight : public Board | ||
{ | ||
|
||
protected: | ||
volatile bool keep_alive; | ||
bool initialized; | ||
bool is_streaming; | ||
std::thread streaming_thread; | ||
Serial *serial; | ||
|
||
int min_package_size; | ||
|
||
virtual int send_to_board (const char *msg); | ||
virtual int send_to_board (const char *msg, std::string &response); | ||
virtual std::string read_serial_response (); | ||
int open_port (); | ||
int set_port_settings (); | ||
void read_thread (); | ||
|
||
public: | ||
Knight (int board_id, struct BrainFlowInputParams params); | ||
~Knight (); | ||
|
||
int prepare_session (); | ||
int start_stream (int buffer_size, const char *streamer_params); | ||
int stop_stream (); | ||
int release_session (); | ||
int config_board (std::string config, std::string &response); | ||
|
||
static constexpr int start_byte = 0xA0; | ||
static constexpr int end_byte = 0xC0; | ||
}; |
Oops, something went wrong.