Version 1.6.0 enhances the bluetooth-terminal library with a modernized configuration system, improved logging capabilities, and better connection management while maintaining backward compatibility through deprecated method support.
API Enhancements
- Added new
onReceivecallback for message handling. - Renamed methods for better consistency (e.g.,
setOnConnected→onConnect) while keeping old methods as deprecated. - Added
setCharacteristicValueSizeto configure maximum data chunk size. - Improved parameter naming for clarity (
data→message).
Configuration System
- Introduced options object for more flexible configuration while maintaining parameter-based initialization.
- Refactored the constructor to accept both the options object and legacy parameters.
- Enhanced error handling with more specific error messages.
Logging System
- Implemented comprehensive logging with multiple levels (none, error, warn, info, log, debug).
- Added
onLogcallback for custom logging integration. - Created context-aware logging with method names and descriptive messages.
Connection Management
- Refactored connection logic for better reliability.
- Improved reconnection mechanics.
- Enhanced error handling during connection and communication.
Documentation & Testing
- Updated README with revised introduction, quick start guide, and API documentation.
- Improved JSDoc comments throughout the codebase.
- Reorganized tests into separate files for better maintainability.
- Expanded test coverage for new features.
Other Improvements
- Maintained backward compatibility with no breaking changes.
- Updated dependencies to the latest versions.
- Improved consistency with Arduino BluetoothTerminal library.
- Removed
splitByLengthmethod due to implementation simplification.
This release focuses on developer experience improvements while ensuring existing implementations continue to work without modification.
Full Changelog: v1.5.0...v1.6.0