Migrating from 3.6#
Every function declared in the 3.6 headers is still there, so existing code compiles and links unchanged. Update the points below to benefit from 4.0.
Replace these functions#
The old getters cannot report a failure. Their replacements return a
ba_error and fill an out-parameter:
3.6 |
4.0 |
|---|---|
|
|
|
|
|
|
|
|
New functions#
ba_eeg_manager_set_output_mode()/ba_eeg_manager_read_output_mode()– built-in test signal.ba_eeg_manager_read_full_battery_info()– battery voltage, current and health.ba_eeg_manager_get_stream_channel_data_types()– the type of each chunk row.
New constants#
Channels:
BA_EEG_CHANNEL_ID_DIGITAL_INPUTis oneuint8_tper sample.Errors:
BA_ERROR_BLUETOOTH_SERVICE_UNAVAILABLE(15),BA_ERROR_UPDATE_REJECTED(16),BA_ERROR_STREAM_START_FAILED(17),BA_INIT_ERROR_NOT_ALL_MANAGERS_CLOSED(12) andBA_INIT_WARNING_NOT_INITIALIZED(9). See Error codes.
Behavior changes#
- Closing the library
ba_core_close()returnsBA_INIT_ERROR_NOT_ALL_MANAGERS_CLOSEDwhile a manager has not been freed. Free every manager first.- The last chunk
Stopping a stream delivers the remaining samples in one last, shorter chunk. Use the callback’s size argument rather than assuming
chunk_size.- Refused settings
ba_eeg_manager_start_stream()andba_eeg_manager_load_config()report settings the device refuses, andba_eeg_manager_set_data_stream_rate()refuses rates the device lacks.- Callbacks
The callback setters may be called from any thread, also while streaming.
- macOS scan results
ba_ble_device::mac_addressholds the device’s CoreBluetooth UUID.- Default log level
BA_LOG_LEVEL_INFO.