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

5 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-18 11:17 +0000

1"""Cosine of the Angle characteristic (0x2AE8).""" 

2 

3from __future__ import annotations 

4 

5from .base import BaseCharacteristic 

6from .templates import ScaledSint8Template 

7 

8 

9class CosineOfTheAngleCharacteristic(BaseCharacteristic[float]): 

10 """Cosine of the Angle characteristic (0x2AE8). 

11 

12 org.bluetooth.characteristic.cosine_of_the_angle 

13 

14 Unitless cosine value expressed as cos(theta) x 100. 

15 M=1, d=-2, b=0 -> resolution 0.01 (-1.00 to 1.00). 

16 A raw value of 0x7F represents 'value is not known'. 

17 

18 Raises: 

19 SpecialValueDetectedError: If raw value is a sentinel (e.g. 0x7F). 

20 """ 

21 

22 _template = ScaledSint8Template.from_letter_method(M=1, d=-2, b=0)