SparkFun Pulsed Coherent Radar Sensor  v2.0.0-3-g4d2d89c
Library for the SparkFun Pulsed Coherent Radar Sensor
Loading...
Searching...
No Matches
sfDevXM125Presence Class Reference

#include <sfDevXM125Presence.h>

Inheritance diagram for sfDevXM125Presence:

Public Member Functions

sfTkError_t begin (sfTkII2C *theBus=nullptr)
 Initializes the Presence detector device. More...
 
sfTkError_t detectorStart (uint32_t start=1000, uint32_t end=5000)
 This function sets all the beginning values for a basic I2C example to be run on the device for presence sensing. More...
 
sfTkError_t getDistanceValuemm (uint32_t &presenceVal)
 This function returns the presence value of the register with all the checks in place as per the I2C Datasheet. More...
 
sfTkError_t getDetectorVersion (uint32_t &major, uint32_t &minor, uint32_t &patch)
 This function returns the RSS version number. More...
 
sfTkError_t getDetectorError (uint32_t &error)
 This function returns the protocol state erorr. More...
 
sfTkError_t getMeasureCounter (uint32_t &counter)
 This function returns the measure counter; the number of measurements performed since restart. More...
 
sfTkError_t getDetectorStatus (uint32_t &status)
 This function returns the detector status flags. See page 17, section 6.2.4 Detector Status. More...
 
sfTkError_t getDetectorErrorStatus (uint32_t &status)
 This function returns the error status according to the bit mask value for the presence devices errors and busy bit. More...
 
sfTkError_t getDetectorPresenceDetected (uint32_t &detected)
 This function returns if there was presence detected. More...
 
sfTkError_t getDetectorPresenceStickyDetected (uint32_t &sticky)
 This function returns if there was presence detected, sticky bit with clear on read. More...
 
sfTkError_t getDetectorRegError (uint32_t &error)
 This function returns the indication that the presence detector failed. More...
 
sfTkError_t getTemperature (uint32_t &temp)
 This function returns the temperature in sensor during measurement (in degree Celsius). Note that it has poor absolute accuracy and should only be used for relative temperature measurements. More...
 
sfTkError_t getDistance (uint32_t &distance)
 This function returns the distance, in millimeters, for the detected presence. More...
 
sfTkError_t getIntraPresenceScore (uint32_t &intra)
 This function returns the measure of amount of fast motion detected. More...
 
sfTkError_t getInterPresenceScore (uint32_t &inter)
 This function returns the measure of amount of slow motion detected. More...
 
sfTkError_t getSweepsPerFrame (uint32_t &sweeps)
 This function returns the number of sweeps that will be captured in each frame (measurement). Default Value: 16 seconds. More...
 
sfTkError_t setSweepsPerFrame (uint32_t sweeps)
 This function sets the number of sweeps that will be captured in each frame (measurement). Default Value: 16 seconds. More...
 
sfTkError_t getInterFramePresenceTimeout (uint32_t &time)
 Returns the number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Default Value: 3 seconds. More...
 
sfTkError_t setInterFramePresenceTimeout (uint32_t time)
 Sets the number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Default Value: 3 seconds. More...
 
sfTkError_t getInterPhaseBoostEnabled (bool &en)
 This function returns the enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data. More...
 
sfTkError_t setInterPhaseBoostEnabled (bool en)
 This function sets the enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data. More...
 
sfTkError_t getIntraDetectionEnabled (bool &en)
 This function returns the bit to enable to detect faster movements inside frames. Default Value: true. More...
 
sfTkError_t setInterDetectionEnabled (bool en)
 This function returns the bit to enable to detect slower movements between frames. Default Value: true. More...
 
sfTkError_t getFrameRate (uint32_t &rate)
 This function returns the presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value Default Value: 12000 mHz. More...
 
sfTkError_t setFrameRate (uint32_t rate)
 This function sets the presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value Default Value: 12000 mHz. More...
 
sfTkError_t getIntraDetectionThreshold (uint32_t &thresh)
 This function returns the threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1300. More...
 
sfTkError_t setIntraDetectionThreshold (uint32_t thresh)
 This function sets the threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1300. More...
 
sfTkError_t getInterDetectionThreshold (uint32_t &thresh)
 This function returns the threshold for detecting slower movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1000. More...
 
sfTkError_t setInterDetectionThreshold (uint32_t thresh)
 This function sets the threshold for detecting slower movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1000. More...
 
sfTkError_t getInterFrameDeviationTime (uint32_t &time)
 This function returns the time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value Default Value: 500 ms. More...
 
sfTkError_t setInterFrameDeviationTime (uint32_t time)
 This function sets the time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value Default Value: 500 ms. More...
 
sfTkError_t getInterFrameFastCutoff (uint32_t &cut)
 This function returns the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 6000 mHz. More...
 
sfTkError_t setInterFrameFastCutoff (uint32_t cut)
 This function sets the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 6000 mHz. More...
 
sfTkError_t getInterFrameSlowCutoff (uint32_t &cut)
 This function returns the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 200 mHz. More...
 
sfTkError_t setInterFrameSlowCutoff (uint32_t cut)
 This function sets the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 200 mHz. More...
 
sfTkError_t getIntraFrameTimeConst (uint32_t &time)
 This functions returns time constant for the depthwise filtering in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 150ms. More...
 
sfTkError_t setIntraFrameTimeConst (uint32_t time)
 This functions sets time constant for the depthwise filtering in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 150ms. More...
 
sfTkError_t getIntraOutputTimeConst (uint32_t &time)
 This function returns time constant for the output in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 300ms. More...
 
sfTkError_t setIntraOutputTimeConst (uint32_t time)
 This function sets the time constant for the output in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 300ms. More...
 
sfTkError_t getInterOutputTimeConst (uint32_t &time)
 This function returns time constant for the output in the inter-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 2000ms. More...
 
sfTkError_t setInterOutputTimeConst (uint32_t time)
 This function sets the time constant for the output in the inter-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 2000ms. More...
 
sfTkError_t getAutoProfileEn (bool &en)
 This function returns if enable/disable for the automatic selection of profile based on start point of measurement. Default Value: true. More...
 
sfTkError_t setAutoProfileEn (bool en)
 This function enables/disables the automatic selection of profile based on start point of measurement. Default Value: true. More...
 
sfTkError_t getAutoStepLengthEn (bool &en)
 This function returns the Enable/Disable automatic selection of step length based on the profile. More...
 
sfTkError_t setAutoStepLengthEn (bool en)
 This function Enables/Disables automatic selection of step length based on the profile. More...
 
sfTkError_t getManualProfile (uint32_t &prof)
 This function returns the profile in use. The profile will only be used if profile auto selection was disabled. More...
 
sfTkError_t setManualProfile (uint32_t prof)
 This function sets the profile to use. The profile will only be used if profile auto selection was disabled. More...
 
sfTkError_t getManualStepLength (uint32_t &length)
 THis function returns the number of steps between each data point. NOTE: The manual step length will only be used if step length auto selection was disabled Default Value: 72. More...
 
sfTkError_t setManualStepLength (uint32_t length)
 THis function returns the number of steps between each data point. NOTE: The manual step length will only be used if step length auto selection was disabled Default Value: 72. More...
 
sfTkError_t getStart (uint32_t &start)
 This function returns the start of measured interval in mm. Note: This value is a factor 1000 larger than the RSS value Default Value: 300mm. More...
 
sfTkError_t setStart (uint32_t start)
 This function sets the start of measured interval in mm. Note: This value is a factor 1000 larger than the RSS value Default Value: 300mm. More...
 
sfTkError_t getEnd (uint32_t &end)
 This function returns the end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value Default Value: 2500. More...
 
sfTkError_t setEnd (uint32_t end)
 This function returns the end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value Default Value: 2500. More...
 
sfTkError_t getResetFilters (bool &reset)
 This function returns if the device is enabled/disabled for the reset of the presence filters during start/restart. Default Value: true. More...
 
sfTkError_t setResetFilters (bool reset)
 This function sets if the device is enabled/disabled for the reset of the presence filters during start/restart . Default Value: true. More...
 
sfTkError_t getHWAAS (uint32_t &avg)
 This function returns the hardware accelerated average sampled (HWAAS). Default Value: 32. More...
 
sfTkError_t setHWAAS (uint32_t avg)
 This function sets the hardware accelerated average sampled (HWAAS). Default Value: 32. More...
 
sfTkError_t getDetectionOnGPIO (uint32_t &detected)
 This function returns the output presence detection on generic GPIO. More...
 
sfTkError_t setDetectionOnGPIO (uint32_t detected)
 This function returns the output presence detection on generic GPIO. More...
 
sfTkError_t setCommand (uint32_t cmd)
 This function sets the execute command. More...
 
sfTkError_t applyConfiguration ()
 This function applies the configuration to the device by writing the defined value to the presence command register. More...
 
sfTkError_t start ()
 This function starts the device by writing the defined start value to the presence command register. More...
 
sfTkError_t stop ()
 This function stops the device by writing the defined stop value to the presence command register. More...
 
sfTkError_t enableUartLogs ()
 This function enables the uart logs of the device by writing the defined value to the presence command register. More...
 
sfTkError_t disableUartLogs ()
 This function disables the uart logs of the device by writing the defined value to the presence command register. More...
 
sfTkError_t logConfiguration ()
 This function enables the configuration log of the device by writing the defined value to the presence command register. More...
 
sfTkError_t reset ()
 This function resets the presence detector settings of the device. More...
 
sfTkError_t getBusy (uint32_t &busy)
 This function returns the busy bit of the presence status register. More...
 
sfTkError_t busyWait ()
 Completes a busy wait loop while the device is uploading information by waiting for the status. Checks the error status register to wait until errors are completed/gone. More...
 
sfTkError_t init (sfTkII2C *theBus=nullptr)
 This function begins the examples/communication. More...
 

Protected Attributes

sfTkII2C * _theBus
 

Member Function Documentation

◆ applyConfiguration()

sfTkError_t sfDevXM125Presence::applyConfiguration ( )

This function applies the configuration to the device by writing the defined value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ begin()

sfTkError_t sfDevXM125Presence::begin ( sfTkII2C *  theBus = nullptr)

Initializes the Presence detector device.

This function sets up the I2C communication and performs initial checks to ensure the device is ready for operation.

Parameters
theBusPointer to the I2C bus object. If nullptr, the default bus is used.
Returns
ksfTkErrOk on success, or error code (value < -1) on failure.

◆ busyWait()

sfTkError_t sfDevXM125Presence::busyWait ( )

Completes a busy wait loop while the device is uploading information by waiting for the status. Checks the error status register to wait until errors are completed/gone.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ detectorStart()

sfTkError_t sfDevXM125Presence::detectorStart ( uint32_t  start = 1000,
uint32_t  end = 5000 
)

This function sets all the beginning values for a basic I2C example to be run on the device for presence sensing.

Parameters
startStart value for presence sensing in mm - default value is 1000
endEnd value for presence sensing in mm - default value is 5000
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ disableUartLogs()

sfTkError_t sfDevXM125Presence::disableUartLogs ( )

This function disables the uart logs of the device by writing the defined value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ enableUartLogs()

sfTkError_t sfDevXM125Presence::enableUartLogs ( )

This function enables the uart logs of the device by writing the defined value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getAutoProfileEn()

sfTkError_t sfDevXM125Presence::getAutoProfileEn ( bool &  en)

This function returns if enable/disable for the automatic selection of profile based on start point of measurement. Default Value: true.

Parameters
enenable/disable selection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getAutoStepLengthEn()

sfTkError_t sfDevXM125Presence::getAutoStepLengthEn ( bool &  en)

This function returns the Enable/Disable automatic selection of step length based on the profile.

Parameters
enEnable/disable selection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getBusy()

sfTkError_t sfDevXM125Presence::getBusy ( uint32_t &  busy)

This function returns the busy bit of the presence status register.

Parameters
busyDevice busy or not
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectionOnGPIO()

sfTkError_t sfDevXM125Presence::getDetectionOnGPIO ( uint32_t &  detected)

This function returns the output presence detection on generic GPIO.

Parameters
detectedOutput presence detected
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorError()

sfTkError_t sfDevXM125Presence::getDetectorError ( uint32_t &  error)

This function returns the protocol state erorr.

Parameters
stateError code for device 0 = Protocol state error 1 = Packet length error 2 = Address error 3 = Write failed 4 = Write to read only
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorErrorStatus()

sfTkError_t sfDevXM125Presence::getDetectorErrorStatus ( uint32_t &  status)

This function returns the error status according to the bit mask value for the presence devices errors and busy bit.

Parameters
statusError status of device (see function for exact error)
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorPresenceDetected()

sfTkError_t sfDevXM125Presence::getDetectorPresenceDetected ( uint32_t &  detected)

This function returns if there was presence detected.

Parameters
detectedPresence Detected
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorPresenceStickyDetected()

sfTkError_t sfDevXM125Presence::getDetectorPresenceStickyDetected ( uint32_t &  sticky)

This function returns if there was presence detected, sticky bit with clear on read.

Parameters
stickySticky Presence Detected
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorRegError()

sfTkError_t sfDevXM125Presence::getDetectorRegError ( uint32_t &  error)

This function returns the indication that the presence detector failed.

Parameters
calibrateIndication of sensor calibration
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorStatus()

sfTkError_t sfDevXM125Presence::getDetectorStatus ( uint32_t &  status)

This function returns the detector status flags. See page 17, section 6.2.4 Detector Status.

Parameters
statusStatus detector flag
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDetectorVersion()

sfTkError_t sfDevXM125Presence::getDetectorVersion ( uint32_t &  major,
uint32_t &  minor,
uint32_t &  patch 
)

This function returns the RSS version number.

Parameters
versionVersion number
patchPatch version number
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDistance()

sfTkError_t sfDevXM125Presence::getDistance ( uint32_t &  distance)

This function returns the distance, in millimeters, for the detected presence.

Parameters
distancedistance in mm
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getDistanceValuemm()

sfTkError_t sfDevXM125Presence::getDistanceValuemm ( uint32_t &  presenceVal)

This function returns the presence value of the register with all the checks in place as per the I2C Datasheet.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getEnd()

sfTkError_t sfDevXM125Presence::getEnd ( uint32_t &  end)

This function returns the end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value Default Value: 2500.

Parameters
endEnd point of measurement in mm
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getFrameRate()

sfTkError_t sfDevXM125Presence::getFrameRate ( uint32_t &  rate)

This function returns the presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value Default Value: 12000 mHz.

Parameters
rateFrame rate, in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getHWAAS()

sfTkError_t sfDevXM125Presence::getHWAAS ( uint32_t &  avg)

This function returns the hardware accelerated average sampled (HWAAS). Default Value: 32.

Parameters
avgaverage samples
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterDetectionThreshold()

sfTkError_t sfDevXM125Presence::getInterDetectionThreshold ( uint32_t &  thresh)

This function returns the threshold for detecting slower movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1000.

Parameters
threshthreshold for faster movements
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterFrameDeviationTime()

sfTkError_t sfDevXM125Presence::getInterFrameDeviationTime ( uint32_t &  time)

This function returns the time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value Default Value: 500 ms.

Parameters
timetime in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterFrameFastCutoff()

sfTkError_t sfDevXM125Presence::getInterFrameFastCutoff ( uint32_t &  cut)

This function returns the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 6000 mHz.

Parameters
cutcutoff frequency in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterFramePresenceTimeout()

sfTkError_t sfDevXM125Presence::getInterFramePresenceTimeout ( uint32_t &  time)

Returns the number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Default Value: 3 seconds.

Parameters
timeNumber of seconds
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterFrameSlowCutoff()

sfTkError_t sfDevXM125Presence::getInterFrameSlowCutoff ( uint32_t &  cut)

This function returns the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 200 mHz.

Parameters
cutcutoff frequency in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterOutputTimeConst()

sfTkError_t sfDevXM125Presence::getInterOutputTimeConst ( uint32_t &  time)

This function returns time constant for the output in the inter-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 2000ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterPhaseBoostEnabled()

sfTkError_t sfDevXM125Presence::getInterPhaseBoostEnabled ( bool &  en)

This function returns the enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data.

Parameters
enEnables increased detection Default Value: false
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getInterPresenceScore()

sfTkError_t sfDevXM125Presence::getInterPresenceScore ( uint32_t &  inter)

This function returns the measure of amount of slow motion detected.

Parameters
interMeasure of slow motion
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getIntraDetectionEnabled()

sfTkError_t sfDevXM125Presence::getIntraDetectionEnabled ( bool &  en)

This function returns the bit to enable to detect faster movements inside frames. Default Value: true.

Parameters
enEnables faster detection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getIntraDetectionThreshold()

sfTkError_t sfDevXM125Presence::getIntraDetectionThreshold ( uint32_t &  thresh)

This function returns the threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1300.

Parameters
threshthreshold for faster movements
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getIntraFrameTimeConst()

sfTkError_t sfDevXM125Presence::getIntraFrameTimeConst ( uint32_t &  time)

This functions returns time constant for the depthwise filtering in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 150ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getIntraOutputTimeConst()

sfTkError_t sfDevXM125Presence::getIntraOutputTimeConst ( uint32_t &  time)

This function returns time constant for the output in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 300ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getIntraPresenceScore()

sfTkError_t sfDevXM125Presence::getIntraPresenceScore ( uint32_t &  intra)

This function returns the measure of amount of fast motion detected.

Parameters
intraMeasure of fast motion
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getManualProfile()

sfTkError_t sfDevXM125Presence::getManualProfile ( uint32_t &  prof)

This function returns the profile in use. The profile will only be used if profile auto selection was disabled.

Parameters
profProfile to use (enum)
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getManualStepLength()

sfTkError_t sfDevXM125Presence::getManualStepLength ( uint32_t &  length)

THis function returns the number of steps between each data point. NOTE: The manual step length will only be used if step length auto selection was disabled Default Value: 72.

Parameters
lengthnumber of steps
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getMeasureCounter()

sfTkError_t sfDevXM125Presence::getMeasureCounter ( uint32_t &  counter)

This function returns the measure counter; the number of measurements performed since restart.

Parameters
counternumber of measurements
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getResetFilters()

sfTkError_t sfDevXM125Presence::getResetFilters ( bool &  reset)

This function returns if the device is enabled/disabled for the reset of the presence filters during start/restart. Default Value: true.

Parameters
resetenabled/disabled
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getStart()

sfTkError_t sfDevXM125Presence::getStart ( uint32_t &  start)

This function returns the start of measured interval in mm. Note: This value is a factor 1000 larger than the RSS value Default Value: 300mm.

Parameters
startmeasured start interval in mm
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getSweepsPerFrame()

sfTkError_t sfDevXM125Presence::getSweepsPerFrame ( uint32_t &  sweeps)

This function returns the number of sweeps that will be captured in each frame (measurement). Default Value: 16 seconds.

Parameters
sweepsNumber of sweeps
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ getTemperature()

sfTkError_t sfDevXM125Presence::getTemperature ( uint32_t &  temp)

This function returns the temperature in sensor during measurement (in degree Celsius). Note that it has poor absolute accuracy and should only be used for relative temperature measurements.

Parameters
tempRelative temperature
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ init()

sfTkError_t sfDevXM125Core::init ( sfTkII2C *  theBus = nullptr)
inherited

This function begins the examples/communication.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ logConfiguration()

sfTkError_t sfDevXM125Presence::logConfiguration ( )

This function enables the configuration log of the device by writing the defined value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ reset()

sfTkError_t sfDevXM125Presence::reset ( )

This function resets the presence detector settings of the device.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setAutoProfileEn()

sfTkError_t sfDevXM125Presence::setAutoProfileEn ( bool  en)

This function enables/disables the automatic selection of profile based on start point of measurement. Default Value: true.

Parameters
enenable/disable selection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setAutoStepLengthEn()

sfTkError_t sfDevXM125Presence::setAutoStepLengthEn ( bool  en)

This function Enables/Disables automatic selection of step length based on the profile.

Parameters
enEnable/disable selection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setCommand()

sfTkError_t sfDevXM125Presence::setCommand ( uint32_t  cmd)

This function sets the execute command.

Parameters
cmdcommand to send to device
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setDetectionOnGPIO()

sfTkError_t sfDevXM125Presence::setDetectionOnGPIO ( uint32_t  detected)

This function returns the output presence detection on generic GPIO.

Parameters
detectedOutput presence detected
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setEnd()

sfTkError_t sfDevXM125Presence::setEnd ( uint32_t  end)

This function returns the end point of measurement interval in millimeters. Note: This value is a factor 1000 larger than the RSS value Default Value: 2500.

Parameters
endEnd point of measurement in mm
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setFrameRate()

sfTkError_t sfDevXM125Presence::setFrameRate ( uint32_t  rate)

This function sets the presence detector frame rate. Note: This value is a factor 1000 larger than the RSS value Default Value: 12000 mHz.

Parameters
rateFrame rate, in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setHWAAS()

sfTkError_t sfDevXM125Presence::setHWAAS ( uint32_t  avg)

This function sets the hardware accelerated average sampled (HWAAS). Default Value: 32.

Parameters
avgaverage samples
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterDetectionEnabled()

sfTkError_t sfDevXM125Presence::setInterDetectionEnabled ( bool  en)

This function returns the bit to enable to detect slower movements between frames. Default Value: true.

Parameters
enEnables faster detection
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterDetectionThreshold()

sfTkError_t sfDevXM125Presence::setInterDetectionThreshold ( uint32_t  thresh)

This function sets the threshold for detecting slower movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1000.

Parameters
threshthreshold for faster movements
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterFrameDeviationTime()

sfTkError_t sfDevXM125Presence::setInterFrameDeviationTime ( uint32_t  time)

This function sets the time constant of the low pass filter for the inter-frame deviation between fast and slow. Note: This value is a factor 1000 larger than the RSS value Default Value: 500 ms.

Parameters
timetime in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterFrameFastCutoff()

sfTkError_t sfDevXM125Presence::setInterFrameFastCutoff ( uint32_t  cut)

This function sets the cutoff frequency of the low pass filter for the fast filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 6000 mHz.

Parameters
cutcutoff frequency in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterFramePresenceTimeout()

sfTkError_t sfDevXM125Presence::setInterFramePresenceTimeout ( uint32_t  time)

Sets the number of seconds the inter-frame presence score needs to decrease before exponential scaling starts for faster decline. Should be between 0 and 30 where 0 means no timeout. Default Value: 3 seconds.

Parameters
timeNumber of seconds
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterFrameSlowCutoff()

sfTkError_t sfDevXM125Presence::setInterFrameSlowCutoff ( uint32_t  cut)

This function sets the cutoff frequency of the low pass filter for the slow filtered absolute sweep mean. Note: This value is a factor 1000 larger than the RSS value Default Value: 200 mHz.

Parameters
cutcutoff frequency in mHz
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterOutputTimeConst()

sfTkError_t sfDevXM125Presence::setInterOutputTimeConst ( uint32_t  time)

This function sets the time constant for the output in the inter-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 2000ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setInterPhaseBoostEnabled()

sfTkError_t sfDevXM125Presence::setInterPhaseBoostEnabled ( bool  en)

This function sets the enable to increase detection of slow motions by utilizing the phase information in the Sparse IQ data.

Parameters
enEnables increased detection Default Value: false
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setIntraDetectionThreshold()

sfTkError_t sfDevXM125Presence::setIntraDetectionThreshold ( uint32_t  thresh)

This function sets the threshold for detecting faster movements inside frames. Note: This value is a factor 1000 larger than the RSS value Default Value: 1300.

Parameters
threshthreshold for faster movements
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setIntraFrameTimeConst()

sfTkError_t sfDevXM125Presence::setIntraFrameTimeConst ( uint32_t  time)

This functions sets time constant for the depthwise filtering in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 150ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setIntraOutputTimeConst()

sfTkError_t sfDevXM125Presence::setIntraOutputTimeConst ( uint32_t  time)

This function sets the time constant for the output in the intra-frame part Note: This value is a factor 1000 larger than the RSS value Default Value: 300ms.

Parameters
timetime const in ms
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setManualProfile()

sfTkError_t sfDevXM125Presence::setManualProfile ( uint32_t  prof)

This function sets the profile to use. The profile will only be used if profile auto selection was disabled.

Parameters
profProfile to use (enum)
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setManualStepLength()

sfTkError_t sfDevXM125Presence::setManualStepLength ( uint32_t  length)

THis function returns the number of steps between each data point. NOTE: The manual step length will only be used if step length auto selection was disabled Default Value: 72.

Parameters
lengthnumber of steps
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setResetFilters()

sfTkError_t sfDevXM125Presence::setResetFilters ( bool  reset)

This function sets if the device is enabled/disabled for the reset of the presence filters during start/restart . Default Value: true.

Parameters
resetenabled/disabled
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setStart()

sfTkError_t sfDevXM125Presence::setStart ( uint32_t  start)

This function sets the start of measured interval in mm. Note: This value is a factor 1000 larger than the RSS value Default Value: 300mm.

Parameters
startmeasured start interval in mm
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ setSweepsPerFrame()

sfTkError_t sfDevXM125Presence::setSweepsPerFrame ( uint32_t  sweeps)

This function sets the number of sweeps that will be captured in each frame (measurement). Default Value: 16 seconds.

Parameters
sweepsNumber of sweeps
Returns
ksfTkErrOk on success, or error code (value < -1)

◆ start()

sfTkError_t sfDevXM125Presence::start ( )

This function starts the device by writing the defined start value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

◆ stop()

sfTkError_t sfDevXM125Presence::stop ( )

This function stops the device by writing the defined stop value to the presence command register.

Returns
ksfTkErrOk on success, or error code (value < -1)

Member Data Documentation

◆ _theBus

sfTkII2C* sfDevXM125Core::_theBus
protectedinherited

The documentation for this class was generated from the following files: