Configs that affect the ToF Proximity detection.
More...
#include <ctre/phoenix6/configs/Configs.hpp>
|
units::length::meter_t | ProximityThreshold = 0.4_m |
| Threshold for object detection.
|
|
units::length::meter_t | ProximityHysteresis = 0.01_m |
| How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively.
|
|
units::dimensionless::scalar_t | MinSignalStrengthForValidMeasurement = 2500 |
| The minimum allowable signal strength before determining the measurement is valid.
|
|
Configs that affect the ToF Proximity detection.
Includes proximity mode and the threshold for simple detection
◆ ProximityParamsConfigs()
constexpr ctre::phoenix6::configs::ProximityParamsConfigs::ProximityParamsConfigs |
( |
| ) |
|
|
constexprdefault |
◆ Deserialize()
◆ Serialize()
std::string ctre::phoenix6::configs::ProximityParamsConfigs::Serialize |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ ToString()
std::string ctre::phoenix6::configs::ProximityParamsConfigs::ToString |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ WithMinSignalStrengthForValidMeasurement()
constexpr ProximityParamsConfigs & ctre::phoenix6::configs::ProximityParamsConfigs::WithMinSignalStrengthForValidMeasurement |
( |
units::dimensionless::scalar_t | newMinSignalStrengthForValidMeasurement | ) |
|
|
inlineconstexpr |
Modifies this configuration's MinSignalStrengthForValidMeasurement parameter and returns itself for method-chaining and easier to use config API.
The minimum allowable signal strength before determining the measurement is valid.
If the signal strength is particularly low, this typically means the object is far away and there's fewer total samples to derive the distance from. Set this value to be below the lowest strength you see when you're detecting an object with the CANrange; the default of 2500 is typically acceptable in most cases.
- Minimum Value: 1
- Maximum Value: 15000
- Default Value: 2500
- Units:
- Parameters
-
newMinSignalStrengthForValidMeasurement | Parameter to modify |
- Returns
- Itself
◆ WithProximityHysteresis()
constexpr ProximityParamsConfigs & ctre::phoenix6::configs::ProximityParamsConfigs::WithProximityHysteresis |
( |
units::length::meter_t | newProximityHysteresis | ) |
|
|
inlineconstexpr |
Modifies this configuration's ProximityHysteresis parameter and returns itself for method-chaining and easier to use config API.
How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively. This is used to prevent bouncing between the detected and undetected states for objects on the threshold.
If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
- Parameters
-
newProximityHysteresis | Parameter to modify |
- Returns
- Itself
◆ WithProximityThreshold()
constexpr ProximityParamsConfigs & ctre::phoenix6::configs::ProximityParamsConfigs::WithProximityThreshold |
( |
units::length::meter_t | newProximityThreshold | ) |
|
|
inlineconstexpr |
Modifies this configuration's ProximityThreshold parameter and returns itself for method-chaining and easier to use config API.
Threshold for object detection.
- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
- Parameters
-
newProximityThreshold | Parameter to modify |
- Returns
- Itself
◆ MinSignalStrengthForValidMeasurement
units::dimensionless::scalar_t ctre::phoenix6::configs::ProximityParamsConfigs::MinSignalStrengthForValidMeasurement = 2500 |
The minimum allowable signal strength before determining the measurement is valid.
If the signal strength is particularly low, this typically means the object is far away and there's fewer total samples to derive the distance from. Set this value to be below the lowest strength you see when you're detecting an object with the CANrange; the default of 2500 is typically acceptable in most cases.
- Minimum Value: 1
- Maximum Value: 15000
- Default Value: 2500
- Units:
◆ ProximityHysteresis
units::length::meter_t ctre::phoenix6::configs::ProximityParamsConfigs::ProximityHysteresis = 0.01_m |
How far above and below the threshold the distance needs to be to trigger undetected and detected, respectively.
This is used to prevent bouncing between the detected and undetected states for objects on the threshold.
If the threshold is set to 0.1 meters, and the hysteresis is 0.01 meters, then an object needs to be within 0.09 meters to be detected. After the object is first detected, the distance then needs to exceed 0.11 meters to become undetected again.
- Minimum Value: 0
- Maximum Value: 1
- Default Value: 0.01
- Units: m
◆ ProximityThreshold
units::length::meter_t ctre::phoenix6::configs::ProximityParamsConfigs::ProximityThreshold = 0.4_m |
Threshold for object detection.
- Minimum Value: 0
- Maximum Value: 4
- Default Value: 0.4
- Units: m
The documentation for this class was generated from the following file: