Skip to content

Class rb::Ultrasound

ClassList > rb > Ultrasound

Public Types

Type Name
typedef std::function< bool(uint32_t)> callback_t

Public Static Attributes

Type Name
constexpr float defaultSpeedOfSound = = 347.13f
< Default is speed at 25C, 50%, 101 kPa

Public Functions

Type Name
float getSpeedOfSound () const
bool isLastMeasurementValid () const
uint32_t lastDistanceMm () const
uint32_t lastDurationUs () const
uint32_t measure ()
void measureAsync (callback_t callback=nullptr)
void setSpeedOfSound (float speedOfSoundInMetersPerSecond=defaultSpeedOfSound)

Public Types Documentation

typedef callback_t

typedef std::function<bool(uint32_t)> rb::Ultrasound::callback_t;

Public Static Attributes Documentation

variable defaultSpeedOfSound

constexpr float rb::Ultrasound::defaultSpeedOfSound;

Public Functions Documentation

function getSpeedOfSound

inline float rb::Ultrasound::getSpeedOfSound () const

function isLastMeasurementValid

inline bool rb::Ultrasound::isLastMeasurementValid () const

function lastDistanceMm

inline uint32_t rb::Ultrasound::lastDistanceMm () const

function lastDurationUs

inline uint32_t rb::Ultrasound::lastDurationUs () const

function measure

uint32_t rb::Ultrasound::measure () 

function measureAsync

void rb::Ultrasound::measureAsync (
    callback_t callback=nullptr
) 

function setSpeedOfSound

void rb::Ultrasound::setSpeedOfSound (
    float speedOfSoundInMetersPerSecond=defaultSpeedOfSound
) 

The documentation for this class was generated from the following file demo-projets/esp/RBCXUltrasound.h