Coverage for src / bluetooth_sig / gatt / characteristics / sensor_location.py: 100%
24 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"""Sensor Location characteristic (0x2A5D)."""
3from __future__ import annotations
5from enum import IntEnum
7from .base import BaseCharacteristic
8from .templates import EnumTemplate
11class SensorLocationValue(IntEnum):
12 """Sensor body location values.
14 Values:
15 OTHER: Other location (0)
16 TOP_OF_SHOE: Top of shoe (1)
17 IN_SHOE: In shoe (2)
18 HIP: Hip (3)
19 FRONT_WHEEL: Front wheel (4)
20 LEFT_CRANK: Left crank (5)
21 RIGHT_CRANK: Right crank (6)
22 LEFT_PEDAL: Left pedal (7)
23 RIGHT_PEDAL: Right pedal (8)
24 FRONT_HUB: Front hub (9)
25 REAR_DROPOUT: Rear dropout (10)
26 CHAINSTAY: Chainstay (11)
27 REAR_WHEEL: Rear wheel (12)
28 REAR_HUB: Rear hub (13)
29 CHEST: Chest (14)
30 SPIDER: Spider (15)
31 CHAIN_RING: Chain ring (16)
32 """
34 OTHER = 0
35 TOP_OF_SHOE = 1
36 IN_SHOE = 2
37 HIP = 3
38 FRONT_WHEEL = 4
39 LEFT_CRANK = 5
40 RIGHT_CRANK = 6
41 LEFT_PEDAL = 7
42 RIGHT_PEDAL = 8
43 FRONT_HUB = 9
44 REAR_DROPOUT = 10
45 CHAINSTAY = 11
46 REAR_WHEEL = 12
47 REAR_HUB = 13
48 CHEST = 14
49 SPIDER = 15
50 CHAIN_RING = 16
53class SensorLocationCharacteristic(BaseCharacteristic[SensorLocationValue]):
54 """Sensor Location characteristic (0x2A5D).
56 org.bluetooth.characteristic.sensor_location
58 Body location of a sensor (17 named positions).
59 Values 17-255 are reserved for future use.
60 """
62 _template = EnumTemplate.uint8(SensorLocationValue)