Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.2.3"
version: "2.2.5"
path:
dependency: transitive
description:
Expand Down
25 changes: 14 additions & 11 deletions lib/src/models/devices/esense_factory.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -56,6 +56,7 @@ class EsenseFactory extends WearableFactory {
axisNames: ["X", "Y", "Z"],
axisUnits: ["g", "g", "g"],
sensorHandler: sensorHandler,
relatedConfigurations: [imuConfig],
),
EsenseSensor(
sensorId: 0x55,
Expand All @@ -65,6 +66,7 @@ class EsenseFactory extends WearableFactory {
axisNames: ["X", "Y", "Z"],
axisUnits: ["dps", "dps", "dps"],
sensorHandler: sensorHandler,
relatedConfigurations: [imuConfig],
),
],
);
Expand Down Expand Up @@ -94,6 +96,7 @@ class EsenseSensor extends Sensor<SensorDoubleValue> {
required List<String> axisNames,
required List<String> axisUnits,
required SensorHandler sensorHandler,
super.relatedConfigurations,
}) : _axisNames = axisNames,
_axisUnits = axisUnits,
_sensorId = sensorId,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down