Data structures¶
Common configuration values¶
- class aio_ld2410.BaudRateIndex[source]¶
Bases:
IntEnumConfigurable baud rates.
- RATE_9600 = 1¶
Baud rate set to 9600Hz.
- RATE_19200 = 2¶
Baud rate set to 19200Hz.
- RATE_38400 = 3¶
Baud rate set to 38400Hz.
- RATE_57600 = 4¶
Baud rate set to 57600Hz.
- RATE_115200 = 5¶
Baud rate set to 115200Hz.
- RATE_230400 = 6¶
Baud rate set to 230400Hz.
- RATE_256000 = 7¶
Baud rate set to 256000Hz.
- RATE_460800 = 8¶
Baud rate set to 460800Hz.
- class aio_ld2410.LightControl[source]¶
Bases:
IntEnumConfiguration of the light control.
- DISABLED = 0¶
The
OUTpin will never be affected by photo-sensor
- BELOW = 1¶
The
OUTpin is HIGH when value is under threshold.
- ABOVE = 2¶
The
OUTpin is HIGH when value is above threshold.
- class aio_ld2410.ResolutionIndex[source]¶
Bases:
IntEnumAll possible gate resolution.
The sensors divides the area in some fixed number of zones called
gates(typically 9). Gates have a default resolution of 75 centimeters, but some models / firmwares allow for more precise resolutions.- RESOLUTION_75CM = 0¶
Each gate covers 75 centimeters.
- RESOLUTION_20CM = 1¶
Each gate covers 20 centimeters.
Command parameters¶
- class aio_ld2410.GateSensitivityConfig[source]¶
Bases:
TypedDictSet current sensitivity values for a specific gate.
This class is used to parse keyword arguments from
LD2410.set_gate_sensitivity().See also
- class aio_ld2410.LightControlConfig[source]¶
Bases:
TypedDictConfiguration of the light controls for the
OUTpin.This class is used to parse keyword arguments from
LD2410.set_light_control().-
control:
LightControl¶ Determines when the
OUTpin is high with sensitivity.
-
default:
OutPinLevel¶ Default value for
OUTwhen not triggered.
-
control:
- class aio_ld2410.ParametersConfig[source]¶
Bases:
TypedDictStandard configuration parameters.
This class is used to parse keyword arguments from
LD2410.set_parameters().See also
Command replies¶
- class aio_ld2410.ConfigModeStatus[source]¶
Values received when entering the configuration mode.
See also
- class aio_ld2410.LightControlStatus[source]¶
Status of the light controls for the
OUTpin.See also
-
control:
LightControl¶ Determines when the
OUTpin is high with sensitivity.
-
default:
OutPinLevel¶ Default value for
OUTwhen not triggered.
-
control:
- class aio_ld2410.ParametersStatus[source]¶
Status of current standard parameters.
See also
-
moving_threshold:
Sequence[int]¶ Array of moving energy thresholds for each gate (9 elements, percentage).
-
moving_threshold:
Report structures¶
- class aio_ld2410.ReportStatus[source]¶
Structure of a report received from the device.
See also
-
basic:
ReportBasicStatus¶ Basic part of the report (always set).
-
engineering:
ReportEngineeringStatus|None¶ Engineering part of the report (only in engineering mode),
Noneotherwise.
-
basic:
- class aio_ld2410.ReportBasicStatus[source]¶
Basic part of the
ReportStatus.See also
-
target_status:
TargetStatus¶ Detection status flags of the target (if any).
-
target_status:
- class aio_ld2410.ReportEngineeringStatus[source]¶
Engineering part of the
ReportStatus.See also
-
out_pin_status:
OutPinLevel¶ Current status of the
OUTpin.
-
out_pin_status:
Protocol structures¶
- class aio_ld2410.protocol.CommandCode[source]¶
Bases:
IntEnumList of known command OpCodes.
- PARAMETERS_WRITE = 96¶
- PARAMETERS_READ = 97¶
- ENGINEERING_ENABLE = 98¶
- ENGINEERING_DISABLE = 99¶
- GATE_SENSITIVITY_SET = 100¶
- FIRMWARE_VERSION = 160¶
- BAUD_RATE_SET = 161¶
- FACTORY_RESET = 162¶
- MODULE_RESTART = 163¶
- BLUETOOTH_SET = 164¶
- BLUETOOTH_MAC_GET = 165¶
- CONFIG_DISABLE = 254¶
- CONFIG_ENABLE = 255¶
- BLUETOOTH_AUTHENTICATE = 168¶
- BLUETOOTH_PASSWORD_SET = 169¶
- DISTANCE_RESOLUTION_SET = 170¶
- DISTANCE_RESOLUTION_GET = 171¶
- LIGHT_CONTROL_SET = 173¶
- LIGHT_CONTROL_GET = 174¶