Coverage for src/bluetooth_sig/gatt/characteristics/torque.py: 100%
5 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
« prev ^ index » next coverage.py v7.14.3, created at 2026-06-28 01:26 +0000
1"""Torque characteristic (0x2B21)."""
3from __future__ import annotations
5from .base import BaseCharacteristic
6from .templates import ScaledSint32Template
9class TorqueCharacteristic(BaseCharacteristic[float]):
10 """Torque characteristic (0x2B21).
12 org.bluetooth.characteristic.torque
14 Torque in Newton metres with a resolution of 0.01 Nm.
15 M=1, d=-2, b=0 → scale factor 0.01.
16 Positive = clockwise around the given axis.
17 A value of 0x7FFFFFFF represents 'value is not known'.
19 Raises:
20 SpecialValueDetectedError: If raw value is a sentinel (e.g. 0x7FFFFFFF).
21 """
23 _template = ScaledSint32Template.from_letter_method(M=1, d=-2, b=0)