Update for Firmware v1.0.0 support
API version 1.4 updates the library to support the new features and changes added in firmware v1.0.0.
Features
- Added classes for Timer, I2C, Settings, and Macro modules
- Added support for peak detector and pulse detector filters
- Added TriggerBuilder class to simplify creating data processing or logging triggers
- Updated GPIO callback functions to match data format for firmware v1.0.0
- Updated TimeDelayBuilder to include differential filter mode
- Added ability to pass in own LocalBroadcastManager for the MetaWear service to use
Descriptions of the new modules are provided below:
| Module | Description |
|---|---|
| Timer | Internal timer that periodically sends notifications |
| I2C | Use the I2C bus to directly communicate with sensors |
| Settings | Change Bluetooth LE advertisement parameters |
| Macro | Program persistent commands to the board that can be run at boot time |
Code Changes
GPIO
- Deprecated receivedAnalogInputAsAbsValue(short), receivedAnalogInputAsSupplyRatio(short), and receivedDigitalInput(byte)
- Added receivedAnalogInputAsAbsValue(byte, short), receivedAnalogInputAsSupplyRatio(byte, short), and receivedDigitalInput(byte, short)
- They are the same as their deprecated variants except the GPIO pin the data is read from is also passed in the callback functions
- Added support for digital state monitoring
- Added pinChangeDetected(byte, byte) callback method which notifies the user when digital state on a pin has changed
Accelerometer
- Changed enableTapDetection to return a TapConfig object
- TapConfig extends ThresholdConfig and provides methods to configure the pulse time limit, latency, and window
Logging
- Added removeLogEntries method
- Removes a number of entries from the logger, requires a disconnect for the erase to occur
- Added addReadTrigger method, which logs data from register read
DataProcessor
- Added addReadFilter method, which processes data from a register read
Debug
- Added resetAfterGarbageCollect method
- Disconnects the board, performs indicated erase operations, then resets the board
TimeDelayBuilder
- Added FilterMode enum and withFilterMode function
MetaWearBleService
- Added useLocalBroadcastManager and clearLocalBroadcastManager to let users toggle between using their own LocalBroadcastManager or the service's broadcast manager
- Deprecated useLocalBroadcasterManager
LoggingTrigger
- Added triggers for the combined XY and YZ axis data: ACCELEROMETER_XY_AXIS and ACCELEROMETER_YZ_AXIS
TriggerBuilder
- Added methods to construct triggers for accelerometer axis data, gpio pins, and data filters
BytesInterpreter
- Added logBytesToGs method which converts bytes to Gs for log entries containing combined axis data