LD2410Async
Asynchronous Arduino ESP32 library for the LD2410 mmWave radar sensor
Loading...
Searching...
No Matches
LD2410Types::DetectionData Struct Reference

Holds the most recent detection data reported by the radar. More...

#include <LD2410Types.h>

Public Member Functions

void print () const
 Debug helper: print detection data contents to Serial.
 

Public Attributes

unsigned long timestamp = 0
 Timestamp (ms since boot) when this data was received.
 
bool engineeringMode = false
 True if engineering mode data was received.
 
bool presenceDetected = false
 True if any target is detected.
 
bool movingPresenceDetected = false
 True if a moving target is detected.
 
bool stationaryPresenceDetected = false
 True if a stationary target is detected.
 
TargetState targetState = TargetState::NO_TARGET
 Current detection state.
 
unsigned int movingTargetDistance = 0
 Distance (cm) to the nearest moving target.
 
byte movingTargetSignal = 0
 Signal strength (0-100) of the moving target.
 
unsigned int stationaryTargetDistance = 0
 Distance (cm) to the nearest stationary target.
 
byte stationaryTargetSignal = 0
 Signal strength (0-100) of the stationary target.
 
unsigned int detectedDistance = 0
 General detection distance (cm).
 
byte movingTargetGateSignalCount = 0
 Number of gates with moving target signals.
 
byte movingTargetGateSignals [9] = { 0 }
 Per-gate signal strengths for moving targets.
 
byte stationaryTargetGateSignalCount = 0
 Number of gates with stationary target signals.
 
byte stationaryTargetGateSignals [9] = { 0 }
 Per-gate signal strengths for stationary targets.
 
byte lightLevel = 0
 Reported ambient light level (0-255).
 
bool outPinStatus = 0
 Current status of the OUT pin (true = high, false = low).
 

Detailed Description

Holds the most recent detection data reported by the radar.

This structure is continuously updated as new frames arrive. Values reflect either the basic presence information or, if engineering mode is enabled, per-gate signal details.

Definition at line 247 of file LD2410Types.h.

Member Function Documentation

◆ print()

void LD2410Types::DetectionData::print ( ) const
inline

Debug helper: print detection data contents to Serial.

Definition at line 280 of file LD2410Types.h.

Member Data Documentation

◆ detectedDistance

unsigned int LD2410Types::DetectionData::detectedDistance = 0

General detection distance (cm).

Definition at line 264 of file LD2410Types.h.

◆ engineeringMode

bool LD2410Types::DetectionData::engineeringMode = false

True if engineering mode data was received.

Definition at line 253 of file LD2410Types.h.

◆ lightLevel

byte LD2410Types::DetectionData::lightLevel = 0

Reported ambient light level (0-255).

Definition at line 273 of file LD2410Types.h.

◆ movingPresenceDetected

bool LD2410Types::DetectionData::movingPresenceDetected = false

True if a moving target is detected.

Definition at line 256 of file LD2410Types.h.

◆ movingTargetDistance

unsigned int LD2410Types::DetectionData::movingTargetDistance = 0

Distance (cm) to the nearest moving target.

Definition at line 260 of file LD2410Types.h.

◆ movingTargetGateSignalCount

byte LD2410Types::DetectionData::movingTargetGateSignalCount = 0

Number of gates with moving target signals.

Definition at line 267 of file LD2410Types.h.

◆ movingTargetGateSignals

byte LD2410Types::DetectionData::movingTargetGateSignals[9] = { 0 }

Per-gate signal strengths for moving targets.

Definition at line 268 of file LD2410Types.h.

◆ movingTargetSignal

byte LD2410Types::DetectionData::movingTargetSignal = 0

Signal strength (0-100) of the moving target.

Definition at line 261 of file LD2410Types.h.

◆ outPinStatus

bool LD2410Types::DetectionData::outPinStatus = 0

Current status of the OUT pin (true = high, false = low).

Definition at line 274 of file LD2410Types.h.

◆ presenceDetected

bool LD2410Types::DetectionData::presenceDetected = false

True if any target is detected.

Definition at line 255 of file LD2410Types.h.

◆ stationaryPresenceDetected

bool LD2410Types::DetectionData::stationaryPresenceDetected = false

True if a stationary target is detected.

Definition at line 257 of file LD2410Types.h.

◆ stationaryTargetDistance

unsigned int LD2410Types::DetectionData::stationaryTargetDistance = 0

Distance (cm) to the nearest stationary target.

Definition at line 262 of file LD2410Types.h.

◆ stationaryTargetGateSignalCount

byte LD2410Types::DetectionData::stationaryTargetGateSignalCount = 0

Number of gates with stationary target signals.

Definition at line 270 of file LD2410Types.h.

◆ stationaryTargetGateSignals

byte LD2410Types::DetectionData::stationaryTargetGateSignals[9] = { 0 }

Per-gate signal strengths for stationary targets.

Definition at line 271 of file LD2410Types.h.

◆ stationaryTargetSignal

byte LD2410Types::DetectionData::stationaryTargetSignal = 0

Signal strength (0-100) of the stationary target.

Definition at line 263 of file LD2410Types.h.

◆ targetState

TargetState LD2410Types::DetectionData::targetState = TargetState::NO_TARGET

Current detection state.

Definition at line 259 of file LD2410Types.h.

◆ timestamp

unsigned long LD2410Types::DetectionData::timestamp = 0

Timestamp (ms since boot) when this data was received.

Definition at line 249 of file LD2410Types.h.


The documentation for this struct was generated from the following file: