Coverage for src / bluetooth_sig / gatt / characteristics / local_north_coordinate.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-03 16:41 +0000

1"""Local North Coordinate characteristic implementation.""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import ScaledSint16Template 

7 

8 

9class LocalNorthCoordinateCharacteristic(BaseCharacteristic[float]): 

10 """Local North Coordinate characteristic (0x2AB0). 

11 

12 org.bluetooth.characteristic.local_north_coordinate 

13 

14 Local North Coordinate characteristic. 

15 """ 

16 

17 # Manual overrides required as Bluetooth SIG registry doesn't provide unit/value type 

18 _manual_unit = "m" 

19 # IPS v1.0 spec Section 3.4: sint16 in decimeters, 0.1 m/unit → fixed 2-byte payload 

20 expected_length = 2 

21 min_length = 2 

22 max_length = 2 

23 _template = ScaledSint16Template(scale_factor=0.1)