diff --git a/CHANGELOG.md b/CHANGELOG.md index f34f019..a74b0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,3 +45,7 @@ README updates (example web app) and add supported platforms. * added support for IMU of Tau-Ring * added support for IMU of eSense + +## 2.2.5 + +* added related sensor configuration to esense sensors \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index d3af3b6..9dc161d 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -342,7 +342,7 @@ packages: path: ".." relative: true source: path - version: "2.2.3" + version: "2.2.5" path: dependency: transitive description: diff --git a/lib/src/models/devices/esense_factory.dart b/lib/src/models/devices/esense_factory.dart index 096c7db..ba2f5b7 100644 --- a/lib/src/models/devices/esense_factory.dart +++ b/lib/src/models/devices/esense_factory.dart @@ -31,22 +31,22 @@ class EsenseFactory extends WearableFactory { EsenseSensorConfigurationValue(frequencyHz: 200.0), ].expand((v) => [v, v.copyWith(options: {StreamSensorConfigOption()})]).toList(); + final imuConfig = EsenseSensorConfiguration( + name: "9-axis IMU", + values: imuConfigValues, + sensorCommand: 0x53, + sensorHandler: sensorHandler, + availableOptions: { + StreamSensorConfigOption(), + }, + ); + Esense esense = Esense( name: device.name, bleManager: bleManager!, discoveredDevice: device, disconnectNotifier: disconnectNotifier!, - sensorConfigurations: [ - EsenseSensorConfiguration( - name: "9-axis IMU", - values: imuConfigValues, - sensorCommand: 0x53, - sensorHandler: sensorHandler, - availableOptions: { - StreamSensorConfigOption(), - }, - ), - ], + sensorConfigurations: [imuConfig], sensors: [ EsenseSensor( sensorId: 0x55, @@ -56,6 +56,7 @@ class EsenseFactory extends WearableFactory { axisNames: ["X", "Y", "Z"], axisUnits: ["g", "g", "g"], sensorHandler: sensorHandler, + relatedConfigurations: [imuConfig], ), EsenseSensor( sensorId: 0x55, @@ -65,6 +66,7 @@ class EsenseFactory extends WearableFactory { axisNames: ["X", "Y", "Z"], axisUnits: ["dps", "dps", "dps"], sensorHandler: sensorHandler, + relatedConfigurations: [imuConfig], ), ], ); @@ -94,6 +96,7 @@ class EsenseSensor extends Sensor { required List axisNames, required List axisUnits, required SensorHandler sensorHandler, + super.relatedConfigurations, }) : _axisNames = axisNames, _axisUnits = axisUnits, _sensorId = sensorId, diff --git a/pubspec.yaml b/pubspec.yaml index 9ad3969..a0c497d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: open_earable_flutter description: This package provides functionality for interacting with OpenEarable devices. Control LED colors, control audio, and access raw sensor data. -version: 2.2.4 +version: 2.2.5 repository: https://github.com/OpenEarable/open_earable_flutter/tree/main platforms: