Skip to content
Draft
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: 2 additions & 2 deletions lib/ble/adapters/_registry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ bool _looksLikeThermometer(String lowercaseName) =>
/// OS-level service filter does not match, so it is also named there
/// ([BandEntry.scanServiceData]).
///
/// EXPERIMENTAL (ASSUMPTIONS R6). Weight becomes a `weight` observation and
/// impedance a vendor observation. With its developer flag on (default off)
/// Verified on a physical Mi Body Composition Scale 2 (XMTZC05HM). Weight
/// becomes a `weight` observation and impedance a vendor observation. With its developer flag on (default off)
/// the newest weight within 10% of the profile's becomes it
/// (`newestWeighing`); impedance
/// stays a measurement only.
Expand Down
4 changes: 3 additions & 1 deletion lib/ble/adapters/miscale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
// impedance are shown attributed; with the scale's flag on, a weighing near
// the profile's weight becomes it (`measurement_inputs.dart`).
//
// EXPERIMENTAL (ASSUMPTIONS R6): nobody on this project owns one.
// The Mi Body Composition Scale 2 (XMTZC05HM) is verified on a physical unit:
// pairing, stored history and live weight with impedance. The Mi Smart Scale 2
// is still EXPERIMENTAL (ASSUMPTIONS R6): nobody on this project owns one.

import 'dart:async';
import 'dart:typed_data';
Expand Down
4 changes: 3 additions & 1 deletion test/adapters/miscale_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ void main() {
final (rows, link) = await _drive(
kMiScaleComposition,
reply: (u, v) => switch ((u == kMiScaleHistoryChar, v.first)) {
(true, 0x01) => [(kMiScaleHistoryChar, [0x01, 2, 0])],
// The XMTZC05HM's real count reply is 7 bytes (captured on hardware);
// weights and stamps below are made up.
(true, 0x01) => [(kMiScaleHistoryChar, [0x01, 2, 0, 1, 0, 0, 0])],
(true, 0x02) => [
(kMiScaleHistoryChar, [
..._bc(0x22, 480, 14000, DateTime.utc(2026, 10, 2, 7)),
Expand Down