Embedded Artistry Framework
Embedded Systems C++ Framework
Classes | Typedefs | Enumerations | Variables

Definitions, functions, and classes related to Time-of-Flight sensors. More...

Classes

class  sensor
 This class defines common time-of-flight (ToF) sensor interfaces. More...
 

Typedefs

using distance_t = uint16_t
 Representation for the ToF range result in mm. More...
 
using cb_t = stdext::inplace_function< void(distance_t)>
 Alias for the read() callback function. More...
 

Enumerations

enum  mode { mode::defaultRange = 0, mode::shortRange, mode::medRange, mode::longRange }
 ToF ranging mode options. More...
 
enum  status {
  status::ok = 0, status::noChange, status::notReady, status::rangeValidMinRangeClipped,
  status::rangeValidMergedPulse, status::rangeInvalid, status::sigmaError, status::signalError,
  status::outOfBoundsError, status::hardwareError, status::processingError, status::crosstalkSignalError,
  status::invalidRoi, status::unknown
}
 

Variables

static const distance_t INVALID_RANGE = UINT16_MAX
 Representation for an invalid range result. More...
 

Detailed Description

Definitions, functions, and classes related to Time-of-Flight sensors.

Typedef Documentation

◆ cb_t

using embvm::tof::cb_t = typedef stdext::inplace_function<void(distance_t)>

Alias for the read() callback function.

◆ distance_t

Representation for the ToF range result in mm.

Enumeration Type Documentation

◆ mode

enum embvm::tof::mode
strong

ToF ranging mode options.

This enum represents the different ToF ranging settings. Not every sensor will have all of these modes; invalid modes should assert() or default to another mode.

Enumerator
defaultRange 

The sensor's default ranging setting.

shortRange 

Short-range mode.

medRange 

Medium-range mode.

longRange 

Long-range mode.

◆ status

enum embvm::tof::status
strong
Enumerator
ok 

Reading is valid.

noChange 

Measurement did not change.

notReady 

Measurement was not ready.

rangeValidMinRangeClipped 

Target is below min detection threshold.

rangeValidMergedPulse 

Range is OK but object is a result of multiple pulses merged together.

rangeInvalid 

Range is invalid.

sigmaError 

There was an unexpectedly large jump between signal readings.

signalError 

An error identifying or interpreting the signal occurred.

outOfBoundsError 

Phase out of valid limits.

hardwareError 

An error occurred with the sensor hardware.

processingError 

A sensor internal algorithm Errored.

crosstalkSignalError 

Crosstalk resulted in an invalid signal.

invalidRoi 

The ROI setting provided to the sensor was invalid.

unknown 

An unknown error occurred.

Variable Documentation

◆ INVALID_RANGE

const distance_t embvm::tof::INVALID_RANGE = UINT16_MAX
static

Representation for an invalid range result.

Referenced by embdrv::vl53l1x::getMaxRangeForModeDark(), and embdrv::vl53l1x::getMaxRangeForModeStrongLight().