We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5451437 commit 9fbb143Copy full SHA for 9fbb143
2 files changed
src/board_controller/brainflow_boards.cpp
@@ -199,17 +199,17 @@ BrainFlowBoards::BrainFlowBoards()
199
{"name", "GaleaAuxiliary"},
200
{"sampling_rate", 50},
201
{"package_num_channel", 0},
202
- {"timestamp_channel", 17},
203
- {"marker_channel", 18},
204
- {"num_rows", 19},
205
- {"battery_channel", 5},
206
- {"eda_channels", {1}},
207
- {"ppg_channels", {2, 3}},
208
- {"accel_channels", {6, 7, 8}},
209
- {"gyro_channels", {9, 10, 11}},
210
- {"magnetometer_channels", {12, 13, 14}},
211
- {"other_channels", {15, 16}},
212
- {"temperature_channels", {4}}
+ {"timestamp_channel", 18},
+ {"marker_channel", 19},
+ {"num_rows", 20},
+ {"battery_channel", 6},
+ {"eda_channels", {1, 2}},
+ {"ppg_channels", {3, 4}},
+ {"accel_channels", {7, 8, 9}},
+ {"gyro_channels", {10, 11, 12}},
+ {"magnetometer_channels", {13, 14, 15}},
+ {"other_channels", {16, 17}},
+ {"temperature_channels", {5}}
213
};
214
brainflow_boards_json["boards"]["4"]["default"] =
215
{
src/board_controller/openbci/galea.cpp
@@ -23,8 +23,7 @@ constexpr int Galea::max_num_packages;
23
constexpr int Galea::max_transaction_size;
24
constexpr int Galea::socket_timeout;
25
26
-Galea::Galea (struct BrainFlowInputParams params)
27
- : Board ((int)BoardIds::GALEA_BOARD, params)
+Galea::Galea (struct BrainFlowInputParams params) : Board ((int)BoardIds::GALEA_BOARD, params)
28
29
socket = NULL;
30
is_streaming = false;
@@ -477,9 +476,9 @@ void Galea::read_thread ()
477
476
uint16_t temperature = 0;
478
int32_t ppg_ir = 0;
479
int32_t ppg_red = 0;
480
- float eda;
+ float eda_volts;
481
memcpy (&temperature, b + 78 + offset, 2);
482
- memcpy (&eda, b + 1 + offset, 4);
+ memcpy (&eda_volts, b + 1 + offset, 4);
483
memcpy (&ppg_red, b + 80 + offset, 4);
484
memcpy (&ppg_ir, b + 84 + offset, 4);
485
// ppg
@@ -489,7 +488,13 @@ void Galea::read_thread ()
489
488
(double)ppg_ir;
490
// eda
491
aux_package[board_descr["auxiliary"]["eda_channels"][0].get<int> ()] =
492
- (double)eda;
+ (double)eda_volts;
+ constexpr double eda_coefficient_1 = 3724389.83278;
493
+ constexpr double eda_coefficient_2 = 1652406.91447;
494
+ double eda_conductance =
495
+ 1000000.0 / ((eda_coefficient_1 * eda_volts) - eda_coefficient_2);
496
+ aux_package[board_descr["auxiliary"]["eda_channels"][1].get<int> ()] =
497
+ eda_conductance;
498
// temperature
499
aux_package[board_descr["auxiliary"]["temperature_channels"][0].get<int> ()] =
500
temperature / 100.0;
0 commit comments