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 CPS v1.1 Table 3.2.

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.

ACCUMULATED_TORQUE_RESOLUTION = 32.0
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
accumulated_torque: float | None = None
bottom_dead_spot_angle: 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
maximum_angle: int | None = None
maximum_force_magnitude: int | None = None
maximum_torque_magnitude: float | None = None
minimum_angle: int | None = None
minimum_force_magnitude: int | None = None
minimum_torque_magnitude: float | None = None
pedal_power_balance: float | None = None
top_dead_spot_angle: int | None = None
class src.bluetooth_sig.gatt.characteristics.cycling_power_measurement.CyclingPowerMeasurementFlags

Bases: enum.IntFlag

Cycling Power Measurement Flags as per CPS v1.1 Table 3.2.

ACCUMULATED_ENERGY_PRESENT = 2048
ACCUMULATED_TORQUE_PRESENT = 4
ACCUMULATED_TORQUE_SOURCE = 8
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
OFFSET_COMPENSATION_INDICATOR = 4096
PEDAL_POWER_BALANCE_PRESENT = 1
PEDAL_POWER_BALANCE_REFERENCE = 2
TOP_DEAD_SPOT_ANGLE_PRESENT = 512
WHEEL_REVOLUTION_DATA_PRESENT = 16