Skip to content

Commit 41a1d4a

Browse files
AranRhiodAndrey1994yecq
authored
Updates on adding Synchroni Devices (#754)
* Synchroni Board setup incomplete Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com> Co-authored-by: Andrey Parfenov <a1994ndrey@gmail.com> Co-authored-by: yecq <yecq_82@hotmail.com>
1 parent f99dda1 commit 41a1d4a

File tree

123 files changed

+5884
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+5884
-17
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,4 +379,3 @@ Makefile
379379
CMakeSettings.json
380380
._.gitignore
381381

382-
build/

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cmake_minimum_required (VERSION 3.13)
2+
23
project (brainflow)
34

45
SET (CMAKE_CXX_STANDARD 11)
@@ -20,6 +21,7 @@ option (USE_LIBFTDI "USE_LIBFTDI" OFF)
2021
option (USE_OPENMP "USE_OPENMP" OFF)
2122
option (WARNINGS_AS_ERRORS "WARNINGS_AS_ERRORS" OFF)
2223
option (BUILD_OYMOTION_SDK "BUILD_OYMOTION_SDK" OFF)
24+
option (BUILD_SYNCHRONI_SDK "BUILD_SYNCHRONI_SDK" ON)
2325
option (BUILD_BLUETOOTH "BUILD_BLUETOOTH" OFF)
2426
option (BUILD_BLE "BUILD_BLE" OFF)
2527
option (BUILD_ONNX "BUILD_ONNX" OFF)
@@ -51,6 +53,8 @@ if (BUILD_TESTS)
5153
include (${CMAKE_CURRENT_SOURCE_DIR}/src/tests/build.cmake)
5254
endif (BUILD_TESTS)
5355

56+
#add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR}/cpp_package/examples/get_data)
57+
5458
include (CMakePackageConfigHelpers)
5559

5660
write_basic_package_version_file (
@@ -72,4 +76,4 @@ install (
7276
EXPORT ${TARGETS_EXPORT_NAME}
7377
NAMESPACE brainflow::
7478
DESTINATION ${CONFIG_INSTALL_DIR}
75-
)
79+
)

conanfile.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ class BrainflowConan(ConanFile):
1515
# Binary configuration
1616
settings = "os", "compiler", "build_type", "arch"
1717
options = {"libftdi": [True, False], "openmp": [True, False], "onnx": [True, False], "bluetooth": [True, False],
18-
"ble": [True, False], "periphery": [True, False], "oymotion": [True, False],
18+
"ble": [True, False], "periphery": [True, False], "oymotion": [True, False],"synchroni": [True, False],
1919
"static_msvc_runtime": [True, False]}
2020
default_options = {"libftdi": False, "openmp": False, "onnx": True, "bluetooth": True,
21-
"ble": True, "periphery": False, "oymotion": False, "static_msvc_runtime": True}
21+
"ble": True, "periphery": False, "oymotion": False,"synchroni": True, "static_msvc_runtime": True}
2222

2323
# Sources are located in the same place as this recipe, copy them to the recipe
2424
exports_sources = "CMakeLists.txt", "src/*", "third_party/*", "cpp_package/build.cmake", "cpp_package/src/*", "cmake/*"
@@ -43,6 +43,11 @@ def build(self):
4343
cmake.definitions["BUILD_BLUETOOTH"] = "ON"
4444
if self.options.ble:
4545
cmake.definitions["BUILD_BLE"] = "ON"
46+
if self.options.synchroni:
47+
if self.settings.os == "Android":
48+
cmake.definitions["BUILD_SYNCHRONI_SDK"] = "OFF"
49+
else:
50+
cmake.definitions["BUILD_SYNCHRONI_SDK"] = "ON"
4651
if self.settings.os != "Windows" and self.options.periphery:
4752
cmake.definitions["USE_PERIPHERY"] = "ON"
4853
if self.settings.os == "Windows" and self.options.oymotion:

csharp_package/brainflow/brainflow/board_controller_library.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@ public enum BoardIds
116116
EXPLORE_PLUS_8_CHAN_BOARD = 54,
117117
EXPLORE_PLUS_32_CHAN_BOARD = 55,
118118
PIEEG_BOARD = 56,
119-
NEUROPAWN_KNIGHT_BOARD = 57
119+
NEUROPAWN_KNIGHT_BOARD = 57,
120+
SYNCHRONI_TRIO_3_CHANNELS_BOARD = 58,
121+
SYNCHRONI_OCTO_8_CHANNELS_BOARD = 59,
122+
OB5000_8_CHANNELS_BOARD = 60,
123+
SYNCHRONI_PENTO_8_CHANNELS_BOARD = 61,
124+
SYNCHRONI_UNO_1_CHANNELS_BOARD = 62,
125+
120126
};
121127

122128

java_package/brainflow/src/main/java/brainflow/BoardIds.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,13 @@ public enum BoardIds
6666
EXPLORE_PLUS_8_CHAN_BOARD(54),
6767
EXPLORE_PLUS_32_CHAN_BOARD(55),
6868
PIEEG_BOARD(56),
69-
NEUROPAWN_KNIGHT_BOARD(57);
69+
NEUROPAWN_KNIGHT_BOARD(57),
70+
SYNCHRONI_TRIO_3_CHANNELS_BOARD(58),
71+
SYNCHRONI_OCTO_8_CHANNELS_BOARD(59),
72+
OB5000_8_CHANNELS_BOARD(60),
73+
SYNCHRONI_PENTO_8_CHANNELS_BOARD(61),
74+
SYNCHRONI_UNO_1_CHANNELS_BOARD(62);
75+
7076

7177
private final int board_id;
7278
private static final Map<Integer, BoardIds> bi_map = new HashMap<Integer, BoardIds> ();

julia_package/brainflow/src/board_shim.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,15 @@ export BrainFlowInputParams
6161
EXPLORE_PLUS_8_CHAN_BOARD = 54
6262
EXPLORE_PLUS_32_CHAN_BOARD = 55
6363
PIEEG_BOARD = 56
64+
6465
NEUROPAWN_KNIGHT_BOARD = 57
66+
SYNCHRONI_TRIO_3_CHANNELS_BOARD = 58
67+
SYNCHRONI_OCTO_8_CHANNELS_BOARD = 59
68+
OB5000_8_CHANNELS_BOARD = 60
69+
SYNCHRONI_PENTO_8_CHANNELS_BOARD = 61
70+
SYNCHRONI_UNO_1_CHANNELS_BOARD = 62
71+
72+
6573

6674
end
6775

matlab_package/brainflow/BoardIds.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@
5959
EXPLORE_PLUS_8_CHAN_BOARD(54)
6060
EXPLORE_PLUS_32_CHAN_BOARD(55)
6161
PIEEG_BOARD(56)
62+
6263
NEUROPAWN_KNIGHT_BOARD(57)
64+
SYNCHRONI_TRIO_3_CHANNELS_BOARD(58)
65+
SYNCHRONI_OCTO_8_CHANNELS_BOARD(59)
66+
OB5000_8_CHANNELS_BOARD(60)
67+
SYNCHRONI_PENTO_8_CHANNELS_BOARD(61)
68+
SYNCHRONI_UNO_1_CHANNELS_BOARD(62)
69+
6370
end
6471
end

nodejs_package/brainflow/brainflow.types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,15 @@ export enum BoardIds {
6969
EXPLORE_PLUS_8_CHAN_BOARD = 54,
7070
EXPLORE_PLUS_32_CHAN_BOARD = 55,
7171
PIEEG_BOARD = 56,
72-
NEUROPAWN_KNIGHT_BOARD = 57
73-
}
7472

73+
NEUROPAWN_KNIGHT_BOARD = 57,
74+
SYNCHRONI_TRIO_3_CHANNELS_BOARD = 58,
75+
SYNCHRONI_OCTO_CHANNELS_BOARD = 59,
76+
OB5000_8_CHANNELS_BOARD = 60,
77+
SYNCHRONI_PENTO_8_CHANNELS_BOARD = 61,
78+
SYNCHRONI_UNO_1_CHANNELS_BOARD = 62
79+
80+
}
7581
export enum IpProtocolTypes {
7682
NO_IP_PROTOCOL = 0,
7783
UDP = 1,

python_package/brainflow/board_shim.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ class BoardIds(enum.IntEnum):
7575
EXPLORE_PLUS_32_CHAN_BOARD = 55 #:
7676
PIEEG_BOARD = 56 #:
7777
NEUROPAWN_KNIGHT_BOARD = 57 #:
78+
SYNCHRONI_TRIO_3_CHANNELS_BOARD = 58 #:
79+
SYNCHRONI_OCTO_8_CHANNELS_BOARD = 59 #:
80+
OB5000_8_CHANNELS_BOARD = 60 #:
81+
SYNCHRONI_PENTO_8_CHANNELS_BOARD = 61 #:
82+
SYNCHRONI_UNO_1_CHANNELS_BOARD = 62 #:
83+
7884

7985

8086
class IpProtocolTypes(enum.IntEnum):
@@ -577,6 +583,10 @@ def __init__(self, board_id: int, input_params: BrainFlowInputParams) -> None:
577583
else:
578584
self._master_board_id = self.board_id
579585

586+
def __del__(self) -> None:
587+
if self.is_prepared():
588+
self.release_session()
589+
580590
@classmethod
581591
def set_log_level(cls, log_level: int) -> None:
582592
"""set BrainFlow log level, use it only if you want to write your own messages to BrainFlow logger,

python_package/examples/enophone/enophone_streaming.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def main():
8585
params.mac_address = args.mac_address
8686

8787
try:
88+
# board_shim = BoardShim(BoardIds.ENOPHONE_BOARD, params)
8889
board_shim = BoardShim(BoardIds.ENOPHONE_BOARD, params)
8990
board_shim.prepare_session()
9091
board_shim.start_stream(450000, '')

0 commit comments

Comments
 (0)