Releases: mbientlab/MetaWear-SDK-Cpp
Firmware v1.3.4 Support
API v0.10.0 adds support for firmware v1.3.4 features and includes and general API improvements. There is also another breaking change to the MblMwBtleConnection struct, developers will need to update their code for the new definition.
Changes
- Added mbl_mw_mag_bmm150_suspend function which places magnetometer in low power mode
- Will only send the command on boards running firmware v1.3.4 and later
- When suspended, all settings will be reset and the sensor will need to be reconfigured before collecting data
- Added
on_disconnect
field to the MblMwBtleConnection struct- See documentation for specifics
- Improved logging implementation to handle time rollover
- Fixed corner case in logging implementation that would think some entries from an 800Hz data sample were duplicates and discard them
- Updated bindings to use array declarations where appropriate
API Refactoring and JavaScript Bindings
v0.9.0 introduces several breaking change to the API, the biggest one being how the MblMwBtleConnection struct is defined and used. Developers will need to update their code to reflect the updated fields in the struct as outlined in the documentation.
JavaScript bindings have been added to the repo, see cbindings.js.
Changes
- Added JavaScript bindings
- Updated miniz build to v2.0.6
- Added
OPT_FLAGS
variable to allow devs to add additional compile flags - Added mbl_mw_metawearboard_get_model_name
- Added accounter and packer processor
- Refactored the
MblMwBtleConnection
struct- Modified read_gatt_char to accept an additional function pointer that is used to pass the read characteristic results back to the SDK
- Added enable_notifications field
- Deprecated mbl_mw_metawearboard_notify_char_changed and mbl_mw_metawearboard_char_read
- Removed the
MblMwMetaBootBoard
type, replaced with mbl_mw_metawearboard_perform_dfu method
Macro Support and Language Binding Updates
C++ SDK v0.8.0 introduces new feature support but also contains breaking changes from the previous API. Furthermore, the structure of the high level language bindings has changed which also breaks existing Python ode (see last section for details).
Lastly, the repository has been renamed to MetaWear-SDK-Cpp Please update existing remote references to point to the new URL.
Changes
- Added support for macro module
- See C++ documentation for details
- To support macro features, the write_gatt_char field now has an extra writeType parameter to distinguish write with response or no response
- Added mbl_mw_metawearboard_get_model function that checks which board model the object is currently communicating with
- Deprecated
*_get_high_freq_*
data signal functions- Renamed them to
*_get_packed_*
to match naming convention of other SDKs - Old names are still available, but will be removed later
- Renamed them to
- Added packed data signal for magnetic field data
- Renamed enum entries and type naming, see next section for specifics
- Enum entries that have units are capitalized to match the unit names instead of all being all caps
- Enum entries and type names share the same prefix
- See the commit diff for specific changes
- Changed math processor's constant op to treat the rhs value as is
- Old behavior would scale the value according to the input signal
- Added preliminary support for DFU
Bindings
Python bindings are now all defined in one cbindings.py file rather than residing in separate modules. Enums and structs also now exist at the module level and share the same name as their C++ counterparts minus the MBL_MW_
and MblMw
prefixes. The SDK's unit tests provide examples for the new Python bindings structure.
C# bindings are no longer provided for the C++ SDK as we now have a full C# SDK,
Crash and Bug Fix on v0.7 Release
APi 0.7.14 is an incremental release that addresses a crash with serializing loggers for readable signals (temperature, humidity, color, step counter, etc.) and fixes a bug that occured when initializing the API with a board that has a different firmware revision than the last seen version by the API.
Bug Fixes and Firmware Feature Support
API v0.7.10 fixes issues with the C# wrapper files and the data processors, and updates the time filter code to support features added in firmware v1.3.2.
Changes
- Fixed bug with using
mbl_mw_dataprocessor_comparator_modify
to modify a board using firmware that use multi comparisons - Corrected parameter typing for the
multi_comparator_*
C# functions- The
references
parameter was originallyref float
, nowfloat[]
- The
- Updated time filter configuration to support sensor fusion data
- Fixed a bug with sensor fusion configuration re-initialized after a deserialization
- Merged PR #13
Serialization Bug Fixes
Release v0.7.4 is a small bug fix that addresses a crash when serializing and deserializing the API state.
Sensor Fusion Support
API v0.7.0 adds support for the sensor fusion algorithm running on MetaMotion boards. In addition to sensor fusion support a changes were aslso made to the magnetometer_bmi150.h header file with some being breaking changes from API v0.6.0.
Changes
- Added sension_fusion.h header file
- Added MblMwEulerAngles, MblMwQuaternion;, and MblMwCorrectedCartesianFloat for the sensor fusion data
- See documentation for more details
- Renamed mbl_mw_mag_bmm150_set_power_preset to mbl_mw_mag_bmm150_set_preset
- Renamed MblMwMagBmm150PowerPreset to MblMwMagBmm150Preset
- Changed the "PP" section to "PRESET"
- Changed "MWL" prefix to "MBL"
- Add mbl_mw_mag_bmm150_configure to manually configure the magnetometer in lieu of using one of the presets
Wrapper
DataSignal Component Support
C++ API v0.6.0 adds two new features the API, fixes a bug with configuring the counter processor, and modifies the return type of the deserialize function.
Changes
- Added mbl_mw_datasignal_get_component
- Provides access to individual components of a multi-valued datasignal i.e. xyz components of an acceleration datasignal
- See the Component Signals in the documentation
- Changed mbl_mw_metawearboard_deserialize to return a status code
- Returns MBL_MW_STATUS_ERROR_SERIALIZATION_FORMAT if the function fails
- Added mbl_mw_ibeacon_set_major_signal and mbl_mw_ibeacon_set_minor_signal
- These variant functions setup the major/minor numbers to always match the output from the input datasignal
- Fixed bug with setting the output size on a counter processor
Bug Fixes, Feature Requests, and MSBuild Scripts
The earlier release of 0.5.21 was a mistake. v0.5.22 is the proper release for these changes
Version 0.5.22 contains bug fixes, handles minor feature requests, and adds MSBuild files to the project.
Changes
- Updated Makefile and Python wrapper definitions so the API runs properly on Raspberry Pi (Issue #7)
- Changed
mbl_mw_metawearboard_free
behavior to not remove timers when called <Return>
tag added to generated C# function wrappers- Fixed Led.Pattern C# struct variables being declared private
- Fixed GCC 6.1.1 compiler warnings
- Fixed bug with removing individual loggers
- Fixed compile issue on gcc 4.7.2 (Issue #10)
- Added
mbl_mw_metawearboard_set_time_for_response
to let users increase timeout length for functions like mbl_mw_metawearboard_initialize (Issue #9) - Added MSBuild build files to build both Win32 and WinRT variant dlls from the command line
- See README for instructions
- Incorporated pull requests #6 and #8
Firmware v1.2.3 Support and API Refactoring
API v0.5.0 is a big update that adds support for firmware v1.2.3 features and refactors parts of the API. There are several breaking changes from v0.4.0 so you will need to update your code to integrate this release.
API Changes
- Moved non-MetaWear related code into newly created platform folder
- Refactored how read commands are issued
- All read commands issued through the
mbl_mw_datasignal_read
function - Variant function,
mbl_mw_datasignal_read_with_parameters
, handles reads that require additional parameters - Removed various read functions from the other header files
- See the Readable Signals section in the C++ documentation
- All read commands issued through the
- Refactored logging API
- Created
MblMwLogger
type to manage signal logging - Added
received_unhandled_entry
variable to the MblMwLogDownloadHandler struct
- Created
- Refactored
MblMwBtleConnection
struct- Added
void*
parameter to the struct's function pointers - Renamed header file from
connection.h
tobtle_connection.h
- Moved header file to
platform
directory
- Added
- Created
MblMwGpioAnalogParameters
struct to wrap parameters for enhanced gpio analog reads - Created
MblMwI2cReadParameters
to wrap parameters for I2C reads - Added
void*
parameter to btle function pointers so C++ code can reuse the same read/write functions - Added support for high frequency (>100Hz) accelerometer and gyro data streams
- High frequency data is only for streaming
- Added step counter support for BMI160 accelerometers
- Added multi-value comparator variant functions to
comparator.h
header filer - Added serialization support for
MblMwMetaWearBoard
- See the Saving and Restoring State section in the C++ documentation
- Added
delay_time_ms
to theMblMwLedPattern
struct - Added SPI support, check the SPI section on the C++ documentation for usage specifics
- Added illuminator led config function
- Used for the color detector
- Removed the
MblMwFnVoid
function pointer type and thecallback.h
header file - Deprecated
mbl_mw_connection_notify_char_changed
andmbl_mw_connection_char_read
- Replaced with
mbl_mw_metawearboard_notify_char_changed
andmbl_mw_metawearboard_char_read
respectively
- Replaced with
mbl_mw_acc_set_odr
andmbl_mw_acc_set_range
return selected setting- Input parameters changed for
mbl_mw_metawearboard_initialize
,mbl_mw_metawearboard_lookup_module
, andmbl_mw_event_end_record
Wrapper Changes
The function pointer wrapper in the C# and Python files have been renamed and updated to match the new C++ API. For function pointers that are passed in as function parameters, the below tables maps the C++ types with the C# and Python equivalents:
C++ | Python | C# |
---|---|---|
MblMwFnBoardPtrInt | Fn_VoidPtr_Int | Fn_IntPtr_Int |
MblMwFnEventPtrInt | Fn_VoidPtr_Int | Fn_IntPtr_Int |
MblMwFnData | Fn_DataPtr | Fn_IntPtr |
MblMwFnDataProcessor | Fn_VoidPtr | Fn_IntPtr |
MblMwFnDataLoggerPtr | Fn_VoidPtr | Fn_IntPtr |
MblMwFnTimerPtr | Fn_VoidPtr | Fn_IntPtr |
C#
For C# delegate changes:
v0.4.0 C# Delegate | v0.5.0 C# Delegate |
---|---|
FnVoidPtrByteArray | Fn_IntPtr_IntPtr_ByteArray |
FnUintUint | Fn_Uint_Uint |
FnUbyteLongByteArray | Fn_Ubyte_Long_ByteArray |
FnVoid | Removed |
FnVoidPtr | Fn_IntPtr |
Also note that the BtleConnection.readGattChar
variable type changed to Fn_IntPtr_IntPtr
.
Python
For Python CFUNTYPE changes:
v0.4.0 Py CFUNCTYPE | v0.5.0 Py CFUNCTYPE |
---|---|
FnGattCharPtr | Fn_VoidPtr_GattCharPtr |
FnGattCharPtrByteArray | Fn_VoidPtr_GattCharPtr_ByteArray |
FnUintUint | Fn_Uint_Uint |
FnUbyteLongByteArray | Fn_Ubyte_Long_ByteArray |
FnVoid | Removed |
FnVoidPtr | Fn_VoidPtr |
FnDataPtr | Fn_DataPtr |