Skip to content

Commit 289d287

Browse files
committed
fix typo
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
1 parent 4816cee commit 289d287

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/board_controller/openbci/galea_serial_v4.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,25 +447,25 @@ void GaleaSerialV4::read_thread ()
447447
timestamp_device;
448448
// accel
449449
aux_package[board_descr["auxiliary"]["accel_channels"][0].get<int> ()] =
450-
accel_scale * cast_16bit_to_int32 (b + 96);
450+
accel_scale * cast_16bit_to_int32 (b + 96 + offset);
451451
aux_package[board_descr["auxiliary"]["accel_channels"][1].get<int> ()] =
452-
accel_scale * cast_16bit_to_int32 (b + 98);
452+
accel_scale * cast_16bit_to_int32 (b + 98 + offset);
453453
aux_package[board_descr["auxiliary"]["accel_channels"][2].get<int> ()] =
454-
accel_scale * cast_16bit_to_int32 (b + 100);
454+
accel_scale * cast_16bit_to_int32 (b + 100 + offset);
455455
// gyro
456456
aux_package[board_descr["auxiliary"]["gyro_channels"][0].get<int> ()] =
457-
gyro_scale * cast_16bit_to_int32 (b + 102);
457+
gyro_scale * cast_16bit_to_int32 (b + 102 + offset);
458458
aux_package[board_descr["auxiliary"]["gyro_channels"][1].get<int> ()] =
459-
gyro_scale * cast_16bit_to_int32 (b + 104);
459+
gyro_scale * cast_16bit_to_int32 (b + 104 + offset);
460460
aux_package[board_descr["auxiliary"]["gyro_channels"][2].get<int> ()] =
461-
gyro_scale * cast_16bit_to_int32 (b + 106);
461+
gyro_scale * cast_16bit_to_int32 (b + 106 + offset);
462462
// magnetometer
463463
aux_package[board_descr["auxiliary"]["magnetometer_channels"][0].get<int> ()] =
464-
magnetometer_scale * cast_16bit_to_int32 (b + 108);
464+
magnetometer_scale * cast_16bit_to_int32 (b + 108 + offset);
465465
aux_package[board_descr["auxiliary"]["magnetometer_channels"][1].get<int> ()] =
466-
magnetometer_scale * cast_16bit_to_int32 (b + 110);
466+
magnetometer_scale * cast_16bit_to_int32 (b + 110 + offset);
467467
aux_package[board_descr["auxiliary"]["magnetometer_channels"][2].get<int> ()] =
468-
magnetometer_scale * cast_16bit_to_int32 (b + 112);
468+
magnetometer_scale * cast_16bit_to_int32 (b + 112 + offset);
469469
push_package (aux_package, (int)BrainFlowPresets::AUXILIARY_PRESET);
470470
}
471471
}

src/board_controller/openbci/galea_v4.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ void GaleaV4::read_thread ()
419419

420420
for (int cur_package = 0; cur_package < num_packages; cur_package++)
421421
{
422-
int offset = cur_package * package_size;
422+
int offset = cur_package * GaleaV4::package_size;
423423
// exg (default preset)
424424
exg_package[board_descr["default"]["package_num_channel"].get<int> ()] =
425425
(double)b[0 + offset];

0 commit comments

Comments
 (0)