Coverage for src / bluetooth_sig / gatt / characteristics / elevation.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-03-18 11:17 +0000
1"""Elevation characteristic implementation."""
3from __future__ import annotations
5from ...types.units import LengthUnit
6from .base import BaseCharacteristic
7from .templates import ScaledSint24Template
10class ElevationCharacteristic(BaseCharacteristic[float]):
11 """Elevation characteristic (0x2A6C).
13 org.bluetooth.characteristic.elevation
15 Elevation characteristic.
17 Represents the elevation relative to sea level unless otherwise
18 specified in the service.
20 Format: sint24 (3 bytes) with 0.01 meter resolution.
21 """
23 _template = ScaledSint24Template(scale_factor=0.01)
25 _manual_unit: str | None = LengthUnit.METERS.value # Override template's "units" default
26 resolution: float = 0.01