src.bluetooth_sig.gatt.characteristics.cycling_power_measurement

Cycling Power Measurement characteristic implementation.

Classes

Name

Description

CyclingPowerMeasurementCharacteristic

Cycling Power Measurement characteristic (0x2A63).

CyclingPowerMeasurementData

Parsed data from Cycling Power Measurement characteristic.

CyclingPowerMeasurementFlags

Cycling Power Measurement Flags as per Bluetooth SIG specification.

Module Contents

class src.bluetooth_sig.gatt.characteristics.cycling_power_measurement.CyclingPowerMeasurementCharacteristic

Bases: src.bluetooth_sig.gatt.characteristics.base.BaseCharacteristic[CyclingPowerMeasurementData]

Cycling Power Measurement characteristic (0x2A63).

Used to transmit cycling power measurement data including instantaneous power, pedal power balance, accumulated energy, and revolution data.

CRANK_TIME_RESOLUTION = 1024.0
PEDAL_POWER_BALANCE_RESOLUTION = 2.0
UNKNOWN_PEDAL_POWER_BALANCE = 255
WHEEL_TIME_RESOLUTION = 2048.0
allow_variable_length: bool = True
min_length: int = 4
class src.bluetooth_sig.gatt.characteristics.cycling_power_measurement.CyclingPowerMeasurementData

Bases: msgspec.Struct

Parsed data from Cycling Power Measurement characteristic.

accumulated_energy: int | None = None
cumulative_crank_revolutions: int | None = None
cumulative_wheel_revolutions: int | None = None
flags: CyclingPowerMeasurementFlags
instantaneous_power: int
last_crank_event_time: float | None = None
last_wheel_event_time: float | None = None
pedal_power_balance: float | None = None
class src.bluetooth_sig.gatt.characteristics.cycling_power_measurement.CyclingPowerMeasurementFlags

Bases: enum.IntFlag

Cycling Power Measurement Flags as per Bluetooth SIG specification.

ACCUMULATED_ENERGY_PRESENT = 8
ACCUMULATED_ENERGY_RESERVED = 2048
ACCUMULATED_TORQUE_PRESENT = 4
BOTTOM_DEAD_SPOT_ANGLE_PRESENT = 1024
CRANK_REVOLUTION_DATA_PRESENT = 32
EXTREME_ANGLES_PRESENT = 256
EXTREME_FORCE_MAGNITUDES_PRESENT = 64
EXTREME_TORQUE_MAGNITUDES_PRESENT = 128
PEDAL_POWER_BALANCE_PRESENT = 1
PEDAL_POWER_BALANCE_REFERENCE = 2
TOP_DEAD_SPOT_ANGLE_PRESENT = 512
WHEEL_REVOLUTION_DATA_PRESENT = 16